BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Venkata,
Sorry for the delay.
Kindly refer the below provided code snippet and sample for validating the cell duplicates. We have prepared the code snippet similar to the one provided by you. In this code we have checked the values of a specific column with the current cell. Please let us know whether the given solution achieves your requirement.
void gridDataBoundGrid1_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)
{
GridCurrentCell cc=this.gridDataBoundGrid1.CurrentCell;
if (e.ColIndex == 1)
{
if (!string.IsNullOrEmpty(this.gridDataBoundGrid1[cc.RowIndex, cc.ColIndex].FormattedText))
{
for (int i = 0; i < gridDataBoundGrid1.Model.RowCount;i++ )
{
if(e.RowIndex!=i)
{
if (this.gridDataBoundGrid1[cc.RowIndex, cc.ColIndex].CellValue.ToString() == gridDataBoundGrid1[i, e.ColIndex].CellValue.ToString())
{
MessageBox.Show(this.gridDataBoundGrid1[cc.RowIndex, cc.ColIndex].CellValue.ToString() + " is already entered");
this.gridDataBoundGrid1[cc.RowIndex, cc.ColIndex].CellValue = string.Empty;
e.Cancel = true;
return;
}
}
}
}
}
}
Please let us know if you have any other concerns.
Thanks & Regards,
AL.Solai.