title: Check for key duplicates in Gridview Frontend ASP.NET C#
body: <p>A person can have many bills.
  Each bill can have many <strong>(Item, Quantity)</strong> entries.
  My primary key is <strong>(Bill_No,Item_Code)</strong> .</p>
  <p>For each <strong>Bill_no</strong>, I can enter a particular <strong>Item_Code</strong> only once.</p>
  <p>I enter the <strong>(Item,Quantity)</strong> details via a Grid View as shown.</p>
  <p><img src="https://i.stack.imgur.com/lq4yh.png" alt="enter image description here" /></p>
  <p>Can I validate this at the front end on <strong>Create Indent</strong> click so that an Item_no entered once in the gridView cannot be entered again before submit is clicked?</p>
  <p>I have done the back end primary key validation in the Data Access Layer. It just ignores the duplicate Item_No and continues with an alert.
  I want to check for duplicate <strong>Item_code</strong> entries row-wise via front end so no data is lost on create.</p>