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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

getting column widths at run time

Thread ID:

Created:

Updated:

Platform:

Replies:

32758 Aug 8,2005 08:30 AM UTC Aug 8,2005 11:22 AM UTC WinForms 6
loading
Tags: GridControl
Catinat Velmourougan
Asked On August 8, 2005 08:30 AM UTC

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

Catinat Velmourougan
Replied On August 8, 2005 08:42 AM UTC

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

Administrator [Syncfusion]
Replied On August 8, 2005 09:05 AM UTC

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.

Catinat Velmourougan
Replied On August 8, 2005 09:09 AM UTC

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

Catinat Velmourougan
Replied On August 8, 2005 09:17 AM UTC

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

Administrator [Syncfusion]
Replied On August 8, 2005 09:22 AM UTC

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?

Catinat Velmourougan
Replied On August 8, 2005 11:22 AM UTC

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?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;