Hello,
I have a xamDataGrid with AllowAddNew="True".
I want to disable the clic and/or enter key to add it, I'll use a button because users can have a touchscreen device.
At close of the app, the "futur" new record is automaticaly added and I don't want this.
How to do it ?
How to create a template only for add new record, because button are different and template too ?
Regards
Hello teamtim,
Thank you for your post. I created an application which shows a possible solution for implementing the requested behavior for the Add New Record row and also a style which will only apply on the Add New Record cells.
Please do not hesitate to let me know if you have any further questions on this matter.
Sincerely,
Radko Kolev
Infragistics Inc.
www.infragistics.com/support
Thanks for this simple, I add my style and me need to place elemnts.
I want to display the add button only in the first line, and remove button for others.
Could ou help me to setup this configuration ?
Please look at the attached file.
Both buttons are well psitionned so it's good.
Actually to add an item, I click on AddButton to allow edition, and when I click on a RemoveButton, the item is added.
After (previous sentence only happen in the first use), edition is allowed, but when I click on AddButton, the item isn't added.
For me, you can allow edition but only add item when the user click on AddButton, and change activeRecord when deletebutton is called.
Because I have some background validation for values, so you can allow edition all the time.
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
The xamDataGrid’s AddRecord row currently adds the new data item in the data source at the moment the user starts typing in the first cell of this row. This behavior currently cannot be configured. To prevent the data items from being added in the data source you can hook to the xamDataGrid’s RecordAdding event and cancel it, but this will also result in the currently edited cell to exit from editing mode.
Your sample is very helpfull, I try to add to my software but I have an issue.
After analysis, the line which is in EditMode, is already in the DataSource if the cursor is in it.
Is it possible to override the AddRecord and only add the line after the clic on the AddButton.
Because my validation is launched when the cursor is in it, and I want to launch it only on the datasource.
I attached my code, to see when to do it.
I’ve been looking at your post and I am not sure I fully understand your scenario. Pease look at the sample I am attaching and check if it fits your need.