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.
Hello,
I want a GridListControl to display the values of an array or an arraylist.
sample:
string[] val = new string[] {"a", "b", "c"};
gridListControl.DataSource = val;
But no values are displayed. I can see 3 rows - but they are empty.
Can I use an Array or an ArrayList (with valuetypes) as a GridListControl''s DataSource?
Greetings
Falk
STstanleyj Syncfusion Team December 19, 2005 02:29 PM UTC
Hi Falk,
You can use ArrayList as DataSource, provided DisplayMember is used. Here is the code snippet for the ArrayList as DataSource to GLC.
ArrayList al = new ArrayList();
al.Add(new numbers("One"));
al.Add(new numbers("Two"));
this.gridListControl1.DataSource = al;
this.gridListControl1.DisplayMember = "Number";
//
//
//
public class numbers
{
private string num;
public numbers(string number)
{
this.num = number;
}
public string Number
{
get
{
return num;
}
}
}
Refer also the sample that is shipped \Syncfusion\Essential Studio\4.1.0.4\windows\Grid.Windows\Samples\Quick Start\GridListControlSample
Best regards,
Stanley