I use WebData Grid in my application, in some reason my scrollbar stucks in the middle of webdata grid and I dont know why. I use this js function
function AfterRowActivate(gn,rowID){var row=igtbl_getElementById(rowID);igtbl_scrollToView(gn,row);}
but it doesn't help me.. Hello All.. I really need your help.
Thanks
im using ie6 and ie7. this issue occurs on my pc
see image below.. i selected the last recod of my grid then my page will load the selected record in my detail panel. but my scroll position set to middle.
could check my code for scrolling:
Public Sub ScrollWebGrid()
If Me.RowCount > 0 Then
Dim index As Integer = 0
If Me.WebDataGrid1.Behaviors.Selection.SelectedRows.Count > 0 Then
index =
Me
.WebDataGrid1.Behaviors.Selection.SelectedRows(0).Index + 1
Else
index = 1
End If
hdwebgridscroll.Value = index * Me.WebDataGrid1.Rows(0).Height.Value
Dim strJS As New StringBuilder
strJS.Append(
" function ScrollSummaryGrid() ")
" { ")
" var gridView = document.getElementById('" & Me.WebDataGrid1.ClientID & "'); ")
"")
" if (gridView!=null)")
" gridView.parentElement.parentElement.scrollTop = document.getElementById('" & hdwebgridscroll.ClientID & "').value;")
" } ")
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "webgridscroll" + Now.Millisecond.ToString, strJS.ToString, True)
Dim sm As ScriptManager = ScriptManager.GetCurrent(Page)
If (sm.IsInAsyncPostBack) Then
'Page.ClientScript.RegisterStartupScript(Me.GetType(), "webgridscroll" + Now.Millisecond.ToString, "ScrollSummaryGrid();", True)
'Page.ClientScript.RegisterStartupScript(Me.GetType(), "webgridscroll" + Now.Millisecond.ToString, "Sys.Application.add_load(ScrollSummaryGrid);", True)
End Sub
Hi hrld22,
Could you give us more information about how is your grid created. What options or behaviors are used? What version of NetAdvantage do you use?
A complete sample would be very helpful.
Thanks,