By setting the DataGridTableStyle Collection Editor, you will be limiting the columns that display. If you don't any DataGridTableStyles in your DataGrid, then it defaults to displaying all the fields in your DataTable.
>Hi Cathi,
>
>I do not want to add new columns, I want to remove columns so they do not show in the grid.
>
>The grid shows too many columns and in the wrong sequence from left to right.
>
>I would like to display only the columns and in the sequence I need from the dataset.
>
>Can this be accomplished using the DataGridTableStyle Collection Editor?
>
>In VFP you just code BROWSE Fields field1, fields2 etc.
>
>Thanks!
>Roland
>
>==========================================================================
>
>>In the property sheet for the DataGrid, click on the TableStyles property. Then click on the "..." to bring up the DataGridTableStyle Collection Editor. From there you add new GridColumnStyles to your DataGrid and bind them to the DataTable columns.
>>
>>>Hi Cathi,
>>>
>>>Its a WinForm. Not yet up to speed on all this web stuff.
>>>
>>>Thanks
>>>Roland
>>>=======================================================
>>>
>>>
>>>
>>>>Is this a WinForm or WebForm application?
>>>>
>>>>>Hi,
>>>>>
>>>>>I have a form that has a grid at the top and fields (lots) below the grid.
>>>>>
>>>>>The dataset has all the fields in the form and they show in the grid.
>>>>>
>>>>>I only want Id Number and Name to appear in the grid as columns from the dataset.
>>>>>
>>>>>How would this be accomplished?
>>>>>
>>>>>Thanks
>>>>>Roland
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi