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

Set focus on first row

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 14 Feb 2009, 05:41 PM
Hi all

I have a grid that I'd like to receive focus after a users selects a combo box above.  I tried putting a databound handler in with the code:  radgrid1.focus();   It nearly works.  It does move focus to the grid, but to the header row.  I want it to select the first cell of the first row which happens to be the autogenerated Select button.  Anyone know how I can specifically set focus to that button?

Thanks
Mark

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Feb 2009, 06:32 AM
Hello Mark,

You can try setting the background color for the cell on the SelectedIndexChanged event of the combobox, as shown below:
cs:
protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        RadGrid1.Items[0].Cells[2].BackColor = System.Drawing.Color.Gold; 
    } 

Thanks
Princy.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or