Ok, so here is what's going on. I created a radgrid with a radtoolbar within it. When I begin an insert, I wish to make the textbox that appears for the name to have the focus of the page. Here is what I have thus far.
This is the example I found on this site to set the focus, but that didn't do anything for my grid. Is there another way to do it? Thanks.
protected void rgdStatusList_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
{ |
if ((e.Item is Telerik.Web.UI.GridEditFormInsertItem) && (e.Item.OwnerTableView.IsItemInserted)) |
{ |
Telerik.Web.UI.GridDataInsertItem insertItem = (Telerik.Web.UI.GridDataInsertItem)e.Item; |
(insertItem["StatusDescription"].Controls[0] as TextBox).Focus(); |
} |
} |
This is the example I found on this site to set the focus, but that didn't do anything for my grid. Is there another way to do it? Thanks.