Posted 29 April 2019, 10:26 pm EST
- Updated 4 October 2022, 1:17 am EST
Hi Basant,
Thank you for your immediate reply. Your sample works but when I changed the datasource into DataTable type, it does not work show the values.
Here’s my datatable
public DataTable GetTable()
{
// Here we create a DataTable with 2 columns.
DataTable table = new DataTable();
table.Columns.Add(“Name”, typeof(string));
table.Columns.Add(“Marks”, typeof(double));
// Here we add 4 DataRows.
table.Rows.Add("Name 1", "100");
table.Rows.Add("Name 2", "150");
table.Rows.Add("Name 3", "200");
table.Rows.Add("Name 4", "250");
return table;
}
Ricky