Datagrid And Formatting

hbash54

Newcomer
Joined
May 15, 2003
Messages
24
The project has been built with the the wizards to add the adapter, connection, dataset, and tied stored procedures to the various operations on the dataset that are needed to maintain the data.

Part of the problem is when and where to generate these template columns. And perhaps another is that I used the wizards at all.

I need to set the format, color, and width properties (preferrably dynamically) and it really seems to be a bear to accomplish this.
 
To set the width and the format of the different columns, you will have to deal with the DataGridTableStyle
Add one to your datagrid, then add some DataGridTextBoxColumn to the GridColumnStyleCollection.
And for each column, you will have to give the mapping name and then can set the width and format.
The TableStyle will override almost all the fomratting of your datagrid, so you will have to reproduce your formatting on it
 
Back
Top