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

Found a way to create new line from tab key press

1 Answer 38 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Louis asked on 03 Oct 2007, 06:02 PM
Ok guys just to share with you if someone is trying to do this. (We absolutly need this)

in the CurrentRowChangedEvent just do this

int idxcur = Int32.MinValue;

int idxold = Int32.MinValue;

if (e.OldRow != null)

idxold = grdSearchResults.Rows.IndexOf(e.OldRow);

if (e.CurrentRow != null)

idxcur = grdSearchResults.Rows.IndexOf(e.CurrentRow);

//last row when tab is pressed so create a new row

if ((idxcur==grdSearchResults.Rows.Count-1 && idxold==Int32.MinValue) || idxcur == idxold)

AddMeANewLine();

This works for me.
If anyone knows how to select the first cell (place it in edit mode) let me know.

hope this help

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 04 Oct 2007, 03:59 PM
Hello Louis ,

This question will be addressed in your other forum post regarding cell edit mode.

Regards,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Louis
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or