Columns hide in Winforms Datagrid

This code is to hide the columns in the DataGrid in WinForms Application.

DataGridTableStyle ColHidStyle = new DataGridTableStyle();
ColHidStyle.MappingName = "HideTest";
ColHidStyle.GridColumnStyles["Modifier"].Width = 0;

or other way is

objDs.Tables["myTableName"].Columns["myColumnName"].ColumnMapping = MappingType.Hidden;


Sadhik said…
It is about removing record from dataset
when i removed a row from the dataset(datset.tablename.rows.remove(row))
after that when i saved a new record it saved on the removed rows position like when i removed the 2nd row and when i am saving the 5th row it is saving on the 2nd position.I already used the dataset.table.clone command

Popular posts from this blog

ASP.NET website "Cannot read configuration file due to insufficient permissions" in IIS 7 and Windows Server 2008

Error occurred in deployment step 'Install app for SharePoint': The System Account cannot perform this action.

Windows Server AppFabric: installation error , While installing SharePoint prerequisite installer