Jump to content


Photo

DBGrid Spaltenbreite automatisch anpassen

dbgrid spaltenbreite

  • Please log in to reply
7 replies to this topic

#1 akio

akio

    Member

  • Members
  • PipPip
  • 15 posts

Posted 01 February 2016 - 08:10 AM

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


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 01 February 2016 - 08:45 AM

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.


  • 1

#3 Ulugbek

Ulugbek

    Advanced Member

  • Banned
  • PipPipPipPip
  • 152 posts
  • LocationTashkent Uzbekistan

Posted 08 February 2016 - 02:35 PM

Good 10x you Bro :)


  • 0

#4 Beginner

Beginner

    Active Member

  • Members
  • PipPipPip
  • 50 posts

Posted 04 May 2016 - 12:29 PM

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?


  • 0

#5 Kiener

Kiener

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 142 posts
  • LocationSwitzerland

Posted 13 September 2016 - 09:50 AM

Yes, its very slow. Is there another solution?


  • 0

Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher.

 

Albert Einstein


#6 md9projetos

md9projetos

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 131 posts
  • LocationSao Paulo- Brazil

Posted 13 September 2016 - 12:51 PM

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.


  • 0

#7 tjpr87

tjpr87

    Newbie

  • Members
  • Pip
  • 4 posts
  • LocationPortugal

Posted 20 September 2017 - 10:38 AM

This works, but it's slow for me to load 25 records with 60 columns.

  • 0

#8 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 20 September 2017 - 11:56 AM

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,


  • 0





Also tagged with one or more of these keywords: dbgrid, spaltenbreite

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users