Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
for(int index =0;index<dt1.rows.count;index++)>
               {
                   CheckBox chkselect = (CheckBox)grdReplicate.Rows[index].FindControl("chkSelect");
                   if (chkselect.Checked == true)
                   {
                       if (res == "")
                       {
                           lblppo=(Label)grdReplicate.Rows[index].FindControl("lblgrdppono");
                           res = Convert.ToString(grdReplicate.DataKeys[index].Value);
                           ppoids = lblppo.Text;
                       }
                   }

LblMsg = Penobj._ExecuteQuery("update t_replicate_detail set MICR_CODE='" + (grdReplicate.Rows[index].Cells[8].Text)+ " ' where Replicate_ID in( '" + res + "')");



But Iam not able to retrive the particular cell value in the gridview.How to go about it?
Posted
Updated 15-May-11 23:15pm
v2
Comments
sudeshchandram 16-May-11 6:20am    
Are you getting any error..????
parmar_punit 16-May-11 7:59am    
what is dt1??? is it DataTable object or dataGridView???

try this
grdReplicate.Rows[index].Cells[8].Value.ToString()
 
Share this answer
 
Comments
Kaira_29 16-May-11 5:18am    
Sorry, I tried this but it is not accepting Visible
Kaira_29 16-May-11 5:18am    
sorry not accepting Value
Kaira_29 16-May-11 5:23am    
Also I am using template field in my gridview control
grdReplicate.Rows[index].Cells[8].Text
seems to ok

can you check by a static index value?
say
grdReplicate.Rows[0].Cells[8].Text
 
Share this answer
 
Comments
Kaira_29 16-May-11 6:06am    
Not working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900