akio Posted February 1, 2016 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 Quote
Sherzod Posted February 1, 2016 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 Quote
Beginner Posted May 4, 2016 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? Quote
Jean-Marc Kiener Posted September 13, 2016 Posted September 13, 2016 Yes, its very slow. Is there another solution? Quote
md9projetos Posted September 13, 2016 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. Quote
TRodrigues Posted September 20, 2017 Posted September 20, 2017 This works, but it's slow for me to load 25 records with 60 columns. Quote
Sherzod Posted September 20, 2017 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, Quote
Fábio Matte Posted June 24, 2021 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. Quote
newsanti Posted August 31, 2023 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? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.