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
710
Unique Rows
posted

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 ?

Parents
  • 28407
    posted

    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

     

Reply Children