检索网格视图的单元格值 [英] Reteiving a cell value of a gridview
本文介绍了检索网格视图的单元格值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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 + "')");
但是我无法在gridview中检索特定的单元格值.如何解决?
But Iam not able to retrive the particular cell value in the gridview.How to go about it?
推荐答案
尝试此操作
try this
grdReplicate.Rows[index].Cells[8].Value.ToString()
grdReplicate.Rows[index].Cells[8].Text
似乎还可以
可以按静态索引值检查吗?
说
seems to ok
can you check by a static index value?
say
grdReplicate.Rows[0].Cells[8].Text
这篇关于检索网格视图的单元格值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文