Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > How to implement paging and Add button

Thread Tools

How to implement paging and Add button

Siegfried Heintze
Posts: n/a
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?


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
dgAssertions.EditItemIndex = 0
Session("bAddInProgress") = "t"
Dim ss As String = Session("bAddInProgress")
End Sub

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Combining numeric mode paging and nextPreview paging in datagrid Red ASP .Net 1 03-12-2005 11:41 PM
datagrid paging - customising paging style wh1974 ASP .Net 0 01-12-2005 03:48 PM
DataSet paging vs Datareader paging =?Utf-8?B?UGF0cmljay5PLklnZQ==?= ASP .Net 1 10-08-2004 02:13 PM
Paging Dr. Who, Paging Dr. Who... Computer Security 1 07-02-2004 08:59 PM