Hi,
On button click I set the editindex, it doesn't apply when I click the button again it shows the row set in the edit mode why?
I have grid view and a button "Add" control on aspx page and when I new is clicked I need to add the set the editindex of the grid to last column:
this is what I am doing
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim oData As New DataTable
Dim oRow As DataRow
oData = Cache("tbl")
oRow = oData.Rows.Add
grdTimes.DataSource = oData
grdTimes.DataBind()
Cache("tbl") = oData
grdTimes.EditIndex = oData.Rows.Count
End Sub
When I click on the Add first time it doesn't display in the edit mode.
When I click on the Add the second time it opens in the edit mode what is the problem?
Thanks.
On button click I set the editindex, it doesn't apply when I click the button again it shows the row set in the edit mode why?
I have grid view and a button "Add" control on aspx page and when I new is clicked I need to add the set the editindex of the grid to last column:
this is what I am doing
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim oData As New DataTable
Dim oRow As DataRow
oData = Cache("tbl")
oRow = oData.Rows.Add
grdTimes.DataSource = oData
grdTimes.DataBind()
Cache("tbl") = oData
grdTimes.EditIndex = oData.Rows.Count
End Sub
When I click on the Add first time it doesn't display in the edit mode.
When I click on the Add the second time it opens in the edit mode what is the problem?
Thanks.