in my app user is able to edit each row in xamDataGrid, in particular one of columns is called Name
I would like the name to be unique identifier and therefore to bane user of entering the name that is already on the list,
how can I do it ?
HI Pokrec,
If you are using s DataTable with a unique key defined. The XamDataGrid's DataError event will fire when the unique constraint is violated.
Here a code snippet
void xgrid_DataError(object sender, Infragistics.Windows.DataPresenter.Events.DataErrorEventArgs e) { //throw new NotImplementedException();
MessageBox.Show(e.Exception.Message.ToString()); e.Handled = true; }
Sincerely,
Matt Developer Support Engineer
thx for hint, "unfortunetly' I am binding to ObservableCollection<T>
how to solve this then ?
thank you for the attached example; it was very helpful and did the trick
thx
HI,
I am just following up on this forum thread.
Please let me know if you need further assistance.
Sincerely, Matt Developer Support Engineer
I am attaching a sample applicaiton that uses a hashtable to keep track unique keys.
Please review my sample