This is a migrated thread and some comments may be shown as answers.

Selected button loss focus

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ashraf
Top achievements
Rank 1
Ashraf asked on 29 Apr 2012, 12:13 PM
Dear  Gents
I add select button  and Edit Button in Radgrid , But when I click edit Button I loss selected item ,
I already made SQl datasource fiter by control radgrid.selectedvalue
 I do not want to lose focus when I click edit
do you have solution  for this issue
see this pictures attached

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Apr 2012, 06:45 AM
Hello Ashraf,

Try the following code to achieve your scenario.
C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
  if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
  {
    GridEditFormItem item = (GridEditFormItem)e.Item;
    item.ParentItem.Selected = true;
  }
}

Thanks,
Shinu.
Tags
Grid
Asked by
Ashraf
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or