本文介绍了获取网格视图控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个网格视图和其中包含贷款的标签.我如何获得价值,我尝试了一下但没用:
Hi all,
I have a grid view and a Label inside it which contains the loan. How can i get the value, I tried this but not working:
double loan = double.Parse(GridView1.Rows[0].Cells[4].Text);
Thanks in advanse!!
推荐答案
Label lbl;
foreach(GridViewRow row in GridView1.Rows)
{
lbl = (Label)row.Cells[4].FindControl("labelname");
double amount = double.Parse(lbl.Text);
// process result here
}
问候,
爱德华
Regards,
Eduard
这篇关于获取网格视图控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!