We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

AddNew and navigation

Thread ID:

Created:

Updated:

Platform:

Replies:

70903 Jan 8,2008 01:54 PM Jan 8,2008 06:35 PM Windows Forms 1
loading
Tags: Grouping
Martin Spencer
Asked On January 8, 2008 01:54 PM

In the TableControlCurrentCellEditingComplete event, I call EndEdit() on the record being edited.

This has the effect of adding a new row, but the navigation tabs to a cell on the new row.

How can I force the current row of the table back to the row that was being edited so that the focus will remain on that row?

Many thanks
Martin


haneefm [Syncfusion]
Replied On January 8, 2008 06:35 PM

Hi Martin,

Y can use the SetCurrent method to set the focus to the particular record's column in grid. Here is a code snippet that give the focus to the first column of the add new row in a grid by using AddNewRecord.SetCurrent method. Below is a code snippet

//For AddNewRecord..
this.grid.TableControl.Table.AddNewRecord.SetCurrent("parentID");

//For CurrentRecord.
//this.grid.TableControl.Table.CurrentRecord.SetCurrent("parentID");

//For fisrt record.
//e.TableControl.Table.Records[0].SetCurrent("parentID");


Best regards,
Haneef


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;