Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GridColumnStyles doesn't have an indexer?!?!?
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00963489
Message ID:
00963526
Views:
8
Einar,

The code...
this.dataGrid1.TableStyles[0].GridColumnStyles[1].Width = <value>;
...should work. I was able to get it to work. I created a grid in code with 3 columns, and then used the above line to change the width of a column from 100 to 5.

Yes, the indexer is read-only, but the width property is not.

My 'guess' (just a guess, nothing more) is that if you're loading the grid and wishing to set the column widths based on your XML settings, perhaps the tablestyle or columnstyles were not fully loaded. The above line of code assumes that everything has been loaded, and that you're just looking to set the widths after everything is loaded.

Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform