akio Posted February 1, 2016 Share Posted February 1, 2016 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 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 More sharing options...
Sherzod Posted February 1, 2016 Share Posted February 1, 2016 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 Link to comment Share on other sites More sharing options...
Ulugbek Posted February 8, 2016 Share Posted February 8, 2016 Good 10x you Bro Link to comment Share on other sites More sharing options...
Beginner Posted May 4, 2016 Share Posted May 4, 2016 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 More sharing options...
Jean-Marc Kiener Posted September 13, 2016 Share Posted September 13, 2016 Yes, its very slow. Is there another solution? Link to comment Share on other sites More sharing options...
md9projetos Posted September 13, 2016 Share Posted September 13, 2016 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 More sharing options...
TRodrigues Posted September 20, 2017 Share Posted September 20, 2017 This works, but it's slow for me to load 25 records with 60 columns. Link to comment Share on other sites More sharing options...
Sherzod Posted September 20, 2017 Share Posted September 20, 2017 Hi,Yes, unfortunately it will take some timeAnother point, you can analyze how you can achieve this on the server side by analyzing the records and changing the width of the columnsBest regards, Link to comment Share on other sites More sharing options...
Fábio Matte Posted June 24, 2021 Share Posted June 24, 2021 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 More sharing options...
newsanti Posted August 31, 2023 Share Posted August 31, 2023 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 More sharing options...
Sherzod Posted August 31, 2023 Share Posted August 31, 2023 columns[0].autoSize(); Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now