Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 15, 2013 07:27 PM by TheHoboLord
Jan 16, 2013 12:35 PM|LINK
I use a Linqdatasource to query from MSSQL DB. I use a Gridview to display data and filter from Linqdatasource. I am developing ASP.NET using (VB.NET) in VS2010. Still a begineer.
The problem I have is that when the filter is too high, there are no records returned. This made the Gridview "disappear" .
This is a problem because for every update, I will read a value from a cell in the gridview (Gridview1.rows(1).cell(0).Text). Thus, when the gridview is gone, my reading will not work and gives error.
1) How do I capture the event that there are no records returned?
2) How do I get to read a value from the recordset (after filtering) from the Linqdatasource, before displaying to the Gridview?
I have searched but there were no satisfactory answers around the net.
Jan 18, 2013 12:38 AM|LINK
when the filter is too high, there are no records returned. This made the Gridview "disappear" .
What do you mean by "too high"?
Can you list for us about your detail codes?
Mar 15, 2013 07:27 PM|LINK
It maybe this issue I had.
I found that the gridview gets stored in the viewstate.
which means if you bind in this Event:
Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
It should display your grid, unless something is wrong with the query.
Hope that Helps!