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
800
Limiting the number of rows which can be added
posted

Hi There,

I wondered if there was a way to toggle the AllowAddNew property of the XamDataGrid based on the number of row present in the grid? I would like to allow the user to enter up to 2 rows, but then no longer be allowed to add more unless they first delete one.

Cheers

Jonathan

Parents
No Data
Reply
  • 5600
    Offline posted

    Hello,

    One way to do this is to hook up for RecordUpdated event and inside set AllowAddNew to false if records count is 2. Another event is RecordsDeleted, where you need to set AllowAddNew to true if records count is less than 2.

    Hope this helps you.

    Regards,

    Anastas

Children