We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

getting column widths at run time

hi clay, I want to know the current width of all columns of a grid at run time. The column width collection should be indexed on the mapping names we give in tabledescriptor. Can I know how to approach this problem? I am not able to search the forums.Only the first page of results is displayed.When you click the second page link it goes to the forum home page.Kindly check with this. regards, Catinat

6 Replies

CV Catinat Velmourougan August 8, 2005 03:42 AM

hi We have this property this.TableControl.Model.ColWidths[ string name]; what does here "name" represent? Is it the mapping name? All my current width info are stored here, but i am not able to pass the mapping name and get the value, when i say this.TAbleControl.Model.ColWidths[mappingname], it always return 0. regards, catinat


AD Administrator Syncfusion Team August 8, 2005 04:05 AM

In a GridGroupingControl, you should use grid.TableDescriptor.Columns[ColName].Width to get the column width. The colname should be teh mappingname used to define teh column.


CV Catinat Velmourougan August 8, 2005 04:09 AM

hi, I tried this earlier. This always returns 0 for every column. Will the width get reflected even if the user adjusts it during run time?For example, if he double clicks and it changes the width, will it get reflected? regards, Catinat


CV Catinat Velmourougan August 8, 2005 04:17 AM

hi, sorry. it actually return -1. regards, catinat


AD Administrator Syncfusion Team August 8, 2005 04:22 AM

It seems to work for me. http://www.syncfusion.com/Support/user/uploads/GGC_ColWidths_792b9739.zip What version of our libraries are you using?


CV Catinat Velmourougan August 8, 2005 06:22 AM

hi clay, It was such an easy thing and i missed it. Didnt sleep well yesterday, thats why I missed on it. Anyhow thanks buddy. regards, catinat >It seems to work for me. >http://www.syncfusion.com/Support/user/uploads/GGC_ColWidths_792b9739.zip > >What version of our libraries are you using?

Loader.
Live Chat Icon For mobile
Up arrow icon