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.
Hi,
I've tried the code in the FAQ How to Hide a Column
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q708q
you gave with GridColumnStyles to the Datagrid's TableStyles.
class MyClass
{
...
ArrayList myList;
...
public void AddObj(Obj o)
{
this.myList.Add(o);
}
}
...
class Obj
{
string Name1;
.....
string NameX;
}
I'd like to display in a datagrid just Name1 or Name2 for example.
I've tried a "normal" table (DataTable) and there is no problem , but for my ArrayList of objects, an ArgumentOutOfRangeException is called : the mapping is not done.
Here is my code :
dataGrid1.DataSource = myClass.myList;
// DataGrid settings
DataGridTableStyle dgts = new DataGridTableStyle();
dgts.MappingName = "myClass.myList";
dataGrid1.TableStyles.Add(dgts);
dgts.GridColumnStyles[2].Width=0;
dgts.DataGrid.Refresh();
Where is the error ?
Thanks
vinh