The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I currently have a GridDataControl bound to a DataTable. I would like to allow the user to hide and show columns of their choosing. How can specify hidden and visible columns of the GridDataControl?
JJJeraldes J Syncfusion Team July 17, 2010 06:51 AM UTC
Hi Mike, You can use the following code to add or remove column from the data table through code behind.
Remove Column:
var col = dataGrid.VisibleColumns.Where(d => d.MappingName == "Description").FirstOrDefault(); this.dataGrid.VisibleColumns.Remove(col); this.dataGrid.Model.InvalidateVisual(true);