I've created a custom datagrid and would like to get only entries
displaying in the grid. The datasource may be a table or dataview. So
I check for this in the custom datagrid class:
if (this.DataSource.GetType().FullName.Equals("System .Data.DataTable"))
dt = (DataTable)this.DataSource;
else if
(this.DataSource.GetType().FullName.Equals("System .Data.DataView"))
dt = ((DataView)this.DataSource).Table;
The problem is I get the entire dataset and not only what is displayed
in the grid. For example, if a dataview has restricted a set from 12
to 4 rows, I get 12 rows. How do I get only the 4 displayed in the
grid?
Thanks,
Brett