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
130
I want to add new row when user press "Enter" button
posted

Hi ,

I want to add new row in xamDataPresenter when user press "Enter" button at last row last column.

how to achieve this kindly let me know.

 

Thanks

Mukesh

Parents
No Data
Reply
  • 9694
    posted

    There are a couple of ways to do this. You could simply use the built in Add Record functionality. With this functionality, the user starts typing into the Add Record area and when the user hits enter, the record is added. Check out the Feature Browser sample for how to use this feature.

    If you want to do something different, you could add a PreviewKeyDown event handler to the Grid. In the event handler method you could check to see if the last record is selected. If it is, add a new record to your data source and the grid will update. After the new record is added you can select it using XamDataGrid APIs.

    There are probably other ways to solve this since WPF and our controls are flexible. If anyone has other ideas, please feel free to post them.

    Thanks!

Children
No Data