How to Validate Column with Same Value? <p>How to validate the column with same value, i try with this code :</p> <pre><code>protected void ASPxGridView1_RowValidating(object sender, DevExpress.Web.Data.ASPxDataValidationEventArgs e) { XPQuery&lt;Inventory_Library.Inventory.t_barang_master&gt; q = new XPQuery&lt;Inventory_Library.Inventory.t_barang_master&gt;(ses); List&lt;Inventory_Library.Inventory.t_barang_master&gt; lst = (from o in q where (o.nama_barang == e.OldValues["nama_barang"] &amp;&amp; o.kode_barang == e.OldValues["kode_barang"]) select o).ToList&lt;Inventory_Library.Inventory.t_barang_master&gt;(); if (lst.Contains(e.OldValues["nama_barang"])) { e.RowError = "Nama barang yang anda masukkan telah terdaftar dalam sistem"; } else if (lst.Contains(e.OldValues["kode_barang"])) { e.RowError = "Kode barang yang anda masukkan telah terdaftar dalam sistem"; } } </code></pre> <p>but that's not work, how to solve this problem, thanks for the answer</p>