I have a grid and want the ability to center the page on a certain row.
I am not using scrolling (or what ever that option is to create scroll bars, etc).
right now I am trying the following:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
String guidToScroll = Request.QueryString["guid"];
if (!String.IsNullOrEmpty(guidToScroll))
{
try
{
Guid scrollTo = new Guid(guidToScroll);
if (((MyObject)e.Item.DataItem).GUID == scrollTo)
{
(e.Item as GridDataItem).Selected = true;
(e.Item as GridDataItem).Focus();
}
}
catch { }
}
}
But focus doesn't center on the page (it cuts of part of the row actually), and after calling it firefox doesn't support click selection any more.
I am not using scrolling (or what ever that option is to create scroll bars, etc).
right now I am trying the following:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
String guidToScroll = Request.QueryString["guid"];
if (!String.IsNullOrEmpty(guidToScroll))
{
try
{
Guid scrollTo = new Guid(guidToScroll);
if (((MyObject)e.Item.DataItem).GUID == scrollTo)
{
(e.Item as GridDataItem).Selected = true;
(e.Item as GridDataItem).Focus();
}
}
catch { }
}
}
But focus doesn't center on the page (it cuts of part of the row actually), and after calling it firefox doesn't support click selection any more.