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

how to set the cursor always at the first column after pressing Insert

1 Answer 24 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tai
Top achievements
Rank 1
Tai asked on 11 Sep 2010, 06:19 AM
Hi
How can i set the cursor always at the first column after pressing the Insert button?
right now, the default setting of the radgridview always sets the cursor at the current selected column for the new row if i press the Insert button which is pretty annoying if the user wants to type fast
(so if i am editing the last column, press insert then the new row always start at the last column. I want it to start at the first column)
thank you

1 Answer, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 15 Sep 2010, 07:10 AM
Hello Tai,

Indeed RadGridView begins edit with current column, but you can easily achieve your goal with a single line of code. Just hook for RadGridView.AddingNewDataItem event:

void radGridView_AddingNewDataItem(object sender, GridViewAddingNewEventArgs e)
        {
            this.radGridView.CurrentColumn = this.radGridView.Columns[0];
        }

Let me know how this works on your end.

Best wishes,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Tai
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or