Jump to content
uniGUI Discussion Forums
akio

DBGrid Spaltenbreite automatisch anpassen

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

Share this post


Link to post
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

Share this post


Link to post
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.

 

 

 

 

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

 

Unidbgrid webpaged = false

fetch all true

 

do you have other method?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi,

Yes, unfortunately it will take some time

Another point, you can analyze how you can achieve this on the server side by analyzing the records and changing the width of the columns

Best regards,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×