Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
Enter data excel style
posted

Good day

 

We want to enter data like one would do in excel. 

 

data (press enter and go to next record same field)

data (press enter and go to next record same field)

data (press enter and go to next record same field)

 

something like that.  From what I have read, I would have to create it in a enter button event.  Is this correct?  This functionality is not supported in the XamDataGrid itself, right?

 

Kind regards

Christo Labuschagne

Parents
No Data
Reply
  • 69686
    Verified Answer
    posted

    Hello Christo,

    You are right, this is not directly supported. There are couple of ways to achieve this though. The XamDataGrid has many events that you can use to go on the next record and start edit mode. Basically, any event that would exit the cell's edit mode would do the trick:

    1. CellUpdating, CellUpdated events

    2. EditModeEnding, EditModeEnded

    3. You can handle the KeyDown event of the editor in the cell or the CellValuePresenter itself.

    In order to start the edit mode of the next line, you can use DataPresenterCommands -

    for example: xamDataGrid1.ExecuteCommand(DataPresenterCommands...);

    You can also start edit mode from the CellValuePresenter object (you can get it by the static method CellValuePresenter.FromCell(...).

    Let me know if you have questions on this.

Children