Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GridColumnStyles doesn't have an indexer?!?!?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00963489
Message ID:
00963526
Vues:
7
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform