Jump to content

DBGrid Spaltenbreite automatisch anpassen


akio

Recommended Posts

i use Delphi XE8 and the Trail Version from UniGui

 

****************************************

in German:

 

Guten Morgen,

 

ist es möglich die Spaltenbreite der UniDBGrid automatisch anzupassen?

 

Wenn ich zur Laufzeit einen doppelklick auf die jeweilige Spalte setze, wird diese automatisch auf die passende Länge angepasst. 

 

Geht dies auch via Quellcode in der UniDBGrid?

 

Einige Beispiele fand ich bereits im Internet, leider bezog sich dies immer nur auf die VCL DBGrid und war irgendwie nicht kompatible mit der UniDBGrid...

 

Ich freue mich auf einen Hilfreichen Tipp :)

 

Danke

Karsten

 

 

 

****************************************

I try to translate in Englich :D

 

googd morning,

 

it is possible to automatically adjust the column width of the UniDBGrid?

 

If I make a double-click on the column, it is automatically adjusted to the appropriate length.

 

Some examples I found this on the Internet, unfortunately, this is always related only to the VCL DBGrid and was somehow not compatible with the UniDBGrid ...

 

your sincerely

Karsten

Link to comment
Share on other sites

Hi,

 

If I understood you correctly, try:

 

UniDBGrid1 -> ClientEvents -> ExtEvents [Ext.data.Store[store] ] add store.load fn:

function store.load(sender, records, successful, eOpts)
{
  sender.grid.columnManager.columns.forEach(function(col){col.autoSize()})
}

Best regards.

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

Hi,

 

If I understood you correctly, try:

 

UniDBGrid1 -> ClientEvents -> ExtEvents [Ext.data.Store[store] ] add store.load fn:

function store.load(sender, records, successful, eOpts)
{
  sender.grid.columnManager.columns.forEach(function(col){col.autoSize()})
}

Best regards.

 

 

 

 

Very very slow rendering in Unidbgrid record 2000 after opening dataset...

 

Unidbgrid webpaged = false

fetch all true

 

do you have other method?

Link to comment
Share on other sites

  • 4 months later...

The latest realease(yesterday one) seems to have a bug,there is already a report about that.

I´m a newbie in uniGUI ,but 2.000 records are too much to be held without a clientdataset,

at least I think so.

In fact in 20 years of Delphi I never needed to show 2.000 record in a Dbgrid.

Link to comment
Share on other sites

  • 1 year later...
  • 3 years later...
On 2/1/2016 at 5:45 AM, Sherzod said:

Hi,

 

If I understood you correctly, try:

 

UniDBGrid1 -> ClientEvents -> ExtEvents [Ext.data.Store[store] ] add store.load fn:


function store.load(sender, records, successful, eOpts)
{
  sender.grid.columnManager.columns.forEach(function(col){col.autoSize()})
}

Best regards.

Excellent resource, it worked here for me, it was a lot of show.

Link to comment
Share on other sites

  • 2 years later...
On 2/1/2016 at 3:45 PM, Sherzod said:

Hi,

 

If I understood you correctly, try:

 

UniDBGrid1 -> ClientEvents -> ExtEvents [Ext.data.Store[store] ] add store.load fn:

function store.load(sender, records, successful, eOpts)
{
  sender.grid.columnManager.columns.forEach(function(col){col.autoSize()})
}

Best regards.

How to write code only columns[0] autosize?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...