I have a problem with my datagrid, in my page load I have the following:
Code:
Sub Page_Load(Sender As Object, E As EventArgs)
MyConnection = New OLEDBConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("/bowl/scores.mdb") & ";")
If Not(IsPostBack)
BindGrid()
End If
End Sub
But with the If Not(IsPostBack) there, when I click the edit for a row link, the page reloads and my grid is gone, If I take out the if not, the datagrid shows up, problem solved right? No. With the If Not gone, when I have finished updating the row and hit update, it wont do anything.... What the heck!!
Anyone seen anything like this?? Here is my aspx.
Thanks for any help
The frustrated Bill
Last edited by billrogers; Jun 3rd, 2002 at 04:20 PM.
You have a BindGrid() in each of your datagrid events right ??
Code:
If Not(IsPostBack)
BindGrid()
End If
is ony for the first default view. After that you still need to bind the data to the grid but it's done in each event after you've edited,deleted, etc.