I was just wondering if it's possible to cast a datagrid DataSource as a
DataSet?
I've stepped through my code when the grid is first being bound and the
DataSource shows up as a DataSet for the datagrid. Then, when I handle on
OnClick event for an image button and the page posts back, I look at the
DataSource for the grid and it says it's null. Is there any way of getting
the grid's current datasource after it loads?
I've tried this exact snipit of code:
DataSet ds = (DataSet)dgResults.DataSource; ....but this is where it says
the DataSource is null.
I want to be able to pull the datasource into a dataset, add a new row to
the dataset and rebind the datagrid showing a new blank row in the grid.
Any help would be appreciated.
--
Thanks in advance,
John Scott.