unhide column

I am using GridDataControl.
How do you redisplay a a hidden column?



3 Replies

DM Deenadhayalan M Syncfusion Team June 23, 2011 10:39 AM UTC

Hi Mary,

Thanks for your interest in Syncfusion products.

You can achieve your requirement by setting IsHidden property as follows,

Code snippet [C#]:

this.dataGrid.VisibleColumns[2].IsHidden = false;

We have prepared a sample based on this. Please find the sample in the following location.

Please let us know if you have any queries.

Regards,
Deenadhayalan



99715_GridDataVisible_ColumnUnhide_75d9a0f2.zip


MF Mary Fontana June 23, 2011 02:10 PM UTC

Sorry I should have explained the problem more in my question.

If you resize a column to its minimum size it becomes hidden.
Is there a way to get it to redisplay to its previous state.

I just now tried it and double click on the header will work, but I had to set the minumum size of the column so that it was visible.






DM Deenadhayalan M Syncfusion Team June 24, 2011 10:48 AM UTC

Hi Mary,

You can achieve your requirement by using the below code snippet.

Code snippet [C#]:

this.datagrid.ResizingColumns += new GridResizingColumnsEventHandler(datagrid_ResizingColumns);

void datagrid_ResizingColumns(object sender, GridResizingColumnsEventArgs args)
{
if (args.Width<5)
args.Width = 100;
}

Please let us know if you have any queries.

Regards,
Deenadhayalan



Loader.
Up arrow icon