Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > DataGrid and columns sizing
 

DataGrid and columns sizing

Hi:
I have a DataGrid with 6 columns. The problem is that after dthe binding, all the columns appear very small and I have to double click between each one to expand them. I have tried lots of things to expand them, but it desn't work. Any solution???
Thanks ;)
MigrationUser 1  Wednesday, July 07, 2004 7:05 AM
At design time, create a TableStyle for the DataGrid whose MappingName is the same as the DataTable name in the DataSet that you will bind to.  Add ColumnStyles to the TableStyle for each field in the table that you want to display.  Set the "DefaultColumnWidth" for each ColumnStyle to something that suits your data.
MigrationUser 1  Friday, July 09, 2004 4:56 PM

You can use google to search for other answers

Custom Search

More Threads

• trying to get the data out of the datagridviewcombobox column
• Making checkbox default value not selected
• DataGridView column filled from lookup table column
• Working with treeviews, typed dataset and bindingsource controls
• Databinding to a class in another project
• Binding source Validation Problem
• Failed to update datatable after delete row.
• Werid problem? Datagrid's NullReferenceException
• Navigator's Broke!
• connect a DataSet to a new database