I'm using the keyboard controls for the RadGrid, however, when i hit enter on a line to edit it, i need it to go to a column that i specify.
The RadGrid has AutoGenerated Columns, and editting is in place.
I've been looking through the forums & KB for the resolution and i see demos and answers if you use an edit form.
I tried to use the following code to set the focus, but the focus isn't really set on the text box, and causes a javascript error when you stop editting.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item.IsInEditMode)
{
string script = String.Format("$get('{0}').focus(); $get('{0}').select();", ((TextBox)e.Item.FindControl("ctl01")).ClientID);
ScriptManager.RegisterStartupScript(Page, typeof(Page), "myscript", script, true);
}
}
The RadGrid has AutoGenerated Columns, and editting is in place.
I've been looking through the forums & KB for the resolution and i see demos and answers if you use an edit form.
I tried to use the following code to set the focus, but the focus isn't really set on the text box, and causes a javascript error when you stop editting.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item.IsInEditMode)
{
string script = String.Format("$get('{0}').focus(); $get('{0}').select();", ((TextBox)e.Item.FindControl("ctl01")).ClientID);
ScriptManager.RegisterStartupScript(Page, typeof(Page), "myscript", script, true);
}
}