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
330
Limit bands to have unique keys
posted

Excuse me if I'm using the incorrect terms as this Infragistics stuff is new to me.

The Groups are declared as GroupID, and the Users are declared as UserID.  The bold portion of the code works, but only for the first group.  It's grabbing a value from a textbox (popup) and comparing it to what I have on the grid.

I think it's best illustrated here:

Group 1

  • User1
  • User2
  • User3

Group 2

  • User1
  • User1 - (again?! no no!)

I've done it manually so far:

GridRowType rowTypes = GridRowType.DataRow;
UltraGridBand band = frm.ultraGridUsers.DisplayLayout.Bands[1];
IEnumerable enumerator = band.GetRowEnumerator(rowTypes);

foreach (UltraGridRow row in enumerator)
{
if ((ultraTextEditorUnit.Text == row.Cells["UnitID"].Text) && (ultraTextEditorGroupAlias.Text == frm.ultraGridUsers.DisplayLayout.Rows[0].Cells["Alias"].Text))
                {
                    MessageBox.Show(this, "Duplicate UnitID", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.ultraTextEditorUnit.Focus();
                    allowClose = false;
                }
                else
                    allowClose = true;
            }

Parents Reply Children
No Data