gridview check duplicates not using sql

Posted by Tomasusa on Stack Overflow See other posts from Stack Overflow or by Tomasusa
Published on 2010-03-17T15:07:19Z Indexed on 2010/03/19 15:31 UTC
Read the original article Hit count: 304

Filed under:
|
|
|
|

I have a code:

foreach (GridViewRow dr in gvCategories.Rows)<br/>
{  
   <br/>
   if (dr.Cells[0].Text == txtEnterCategory.Text.Trim())<br/>
   <br/>
    isError=true;
   <br/>
   <br/> 
}

Debugging: dr.Cells[0].Text is always "", even there are records. How to use a loop to check each row to find if a record exists in the gridview not using sql?

© Stack Overflow or respective owner

Related posts about gridview

Related posts about c#