G
Guest
In ASP.NET 1.1, I have SmartNavigation turned on so that the user's focus
will remain on the line in the datagrid they choose to edit.
When the user chooses to add a new line in the datagrid, rather than only
show that line, I'm displaying all items in the datagrid, with the new line
at the bottom.
With grdResults
' Set editing on last row
.EditItemIndex = .Items.Count
.DataSource = ds
.DataBind()
End With
This is fine if the number of items in the grid doesn't go beyond a page.
After that, the new line is not the focus, and the user needs to scroll down
the page to access the new line. How can I set the focus to that new line?
Here is my code in the Page_Load event:
If Not Page.IsPostBack Then
Try
Me.LoadGrid()
Catch ex As Exception
ShowMessageBox(Me, ex.Message)
End Try
End If
will remain on the line in the datagrid they choose to edit.
When the user chooses to add a new line in the datagrid, rather than only
show that line, I'm displaying all items in the datagrid, with the new line
at the bottom.
With grdResults
' Set editing on last row
.EditItemIndex = .Items.Count
.DataSource = ds
.DataBind()
End With
This is fine if the number of items in the grid doesn't go beyond a page.
After that, the new line is not the focus, and the user needs to scroll down
the page to access the new line. How can I set the focus to that new line?
Here is my code in the Page_Load event:
If Not Page.IsPostBack Then
Try
Me.LoadGrid()
Catch ex As Exception
ShowMessageBox(Me, ex.Message)
End Try
End If