I have a datatable which has columns and rows in it.
I want to add all column's information and few rows depending on two variables (_firstIndex and _lastIndex) from datatable into datagrid.
how do i accomplish this?
for e.g. the logic should be something like below---
(the following code doesnt work but it gives an idea on what i want)
theDataGridView.Cols.AddRange(datatable.Columns);
for (int i = _firstIndex; i < datatable.Rows.Count && i <= _lastIndex; i++)
{
theDataGridView.Rows.Add(datatable.Rows[i]);
}
/*
My data is bunch of rows from a database which may or may not have primary key. I am trying to use 10tec igrid to display only 20 of these rows at a time. There will be options for "Next Page" and "Last Page" which will fetch me the next or last 20 rows.
*/
Edited by moderator
2013-02-25T12:30:03Z
|
Reason: Not specified