Hi
The sample undo pages are good but don't fully address my needs.
So I see that Undo only undoes the last action, either a cell add or a row add.
What unique event is hit when the whole row is added?? I need to look at and validate the added values.
It is not XamDataGrid1_RecordAdded or XamDataGrid1_RecordAdding. Those are also hit for a cell. I am using XamDataGrid1_RecordDeactivating, but that is only kicked off if I click on another row.
Thanks. Howard
Hello Howard,
All the events that ends with “-ing” can be canceled by setting the e.Cancel Property to true. Instead of RecordActivated and CellActivated, you can handle RecordActiating and CellActivating events, which are fired first and cancel them, based on your condition.
Hope this helps you.
Hi Stefan
I am having complications with this.
My grid has 3 columns that have a XamComboEditor for values.
We need users to be able to add rows. We want them to be able to Edit rows, but NOT be able to change 2 out of the 3 XamComboEditors.
Is it possible to simply show the values in the rows above the Add row? Since I doubt there is, is there a way to Cancel in the RecordActivated, CellActivated, or EditModeStarting events and show a popup message that these are not allowed to be changed?
Thank you, Howard
I am glad that you were able to resolve your issue. Also I can suggest you see this link from our online documentation:
http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/xamData_Selection_Overview.html
where you can find more information about the XamDataGrid's selection.
I've been sidetracked on a different project at work, so I couldn't get back to you until now. Thank you so much for creating the sample project for me. I changed the references and it seems to work fine.
I think the RecordUpdating event is the right one for me, so thank you.
But in my more complicated page, I noticed a couple of things. If you can shed any light, that would be appreciated.
I'm pretty sure I had to remove these 2 lines from the XamDataGrid's FieldLayoutSettings. Is there a web page that explains them? SelectionTypeCell="Single" SelectionTypeRecord="Single"
Also, these events are called times, I don't know why. RecordAdded RecordUpdating
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the RecordAdded event and set the Tag of the Record to “Added”. This way in the RecordUpdating event I can check if the Record is Added and cancel the event if needed. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.