eferron
asked on
GridView and DataBinding (ADO.NET/ASP.NET)
How do I access the entire dataset/datatable in a gridview? I am using data binding just a SqlDataSource (SqlDataSource1) configured to execute a stored proc passing some values from controls on a asp.net page. The GridView control has it's DataSourceID set to SqlDataSource1. I know how to use the DataSource property when manually writing the code, however I am modifying an exisiting application so I have some limitations without refactoring a ton of code.
On the click event of a button I need to access the data in the current grid (I am trying to avoid running the query again if at all possible).
Make sense? Any thoughts?
Thanks,
Ed
On the click event of a button I need to access the data in the current grid (I am trying to avoid running the query again if at all possible).
Make sense? Any thoughts?
Thanks,
Ed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have to have paging enabledso the grid does not have all of the data in only the current page. I think I have determined that I will need to reexecute the query.
thanks...
Ed
thanks...
Ed
ASKER
Not really what I was looking for but it is close enough
You can access data in the gridview by using
GridView1.Rows([rowindex])
Hope this helps
-M3mph15