UnHide Columns by commands

1.     In SFDataGrid by resizing the columns, more then one column was hide(by resizing cursor), but by command How Can I unhide the columns.As unable to find the hidden columns in sfdata grid.



1 Reply

AK Adhikesevan Kothandaraman Syncfusion Team August 13, 2018 10:21 AM UTC

Hi Deepak, 

Thanks for using Syncfusion products. 

You can programmatically unhide the hidden columns by setting the Visible property as true.  

Code Sample: 
//To get the hidden columns collection 
List<GridColumn> hiddenColumns = new List<GridColumn>(); 
foreach (var column in sfDataGrid.Columns) 
    if (!column.Visible) 
        hiddenColumns.Add(column); 
 
//To change the visibility of the hidden columns. 
foreach (var column in hiddenColumns) 
     column.Visible = true; 
 

You can also unhide the hidden columns by using the unhide cursor by setting the AllowResizingHiddenColumns columns property as true. It will show the unhide cursor while moving the mouse pointer to the hidden column indicator at the column header. 

//To Unhidden the column using the mouse cursor. 
sfDataGrid.AllowResizingHiddenColumns = true; 



Regards, 
Adhi 


Loader.
Up arrow icon