S
Siegfried Heintze
When I have no paging, this code below works great. However, when I enable
paging, it does not work right. The add button clobbers some existing row.
I think this is because I'm using EditItemIndex = 0.
How do I set the EditItemIndex equal to the last row in the display?
Will this fix my problem?
Sieg
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAdd.Click
Dim dr As dsAssertions.AssertionsRow
dr = Me.DsAssertions1.Assertions.NewRow
dr.A = "" 'txtA.Text
dr.B = "" 'txtB.Text
dr.nAssertion = txtAssertion.Text
dr.ridCase = 359 'txtnCase.Text
DsAssertions1.Assertions.Rows.InsertAt(dr,
DsAssertions1.Assertions.Rows.Count)
dgAssertions.EditItemIndex = 0
Session("bAddInProgress") = "t"
Dim ss As String = Session("bAddInProgress")
rebind()
End Sub
paging, it does not work right. The add button clobbers some existing row.
I think this is because I'm using EditItemIndex = 0.
How do I set the EditItemIndex equal to the last row in the display?
Will this fix my problem?
Sieg
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAdd.Click
Dim dr As dsAssertions.AssertionsRow
dr = Me.DsAssertions1.Assertions.NewRow
dr.A = "" 'txtA.Text
dr.B = "" 'txtB.Text
dr.nAssertion = txtAssertion.Text
dr.ridCase = 359 'txtnCase.Text
DsAssertions1.Assertions.Rows.InsertAt(dr,
DsAssertions1.Assertions.Rows.Count)
dgAssertions.EditItemIndex = 0
Session("bAddInProgress") = "t"
Dim ss As String = Session("bAddInProgress")
rebind()
End Sub