猿问
GridView
怎么样获取GridView中选中行的值。不在前面添加任何按钮。。。。。
怎么知道GridView中是选中的哪一行。。。。。
一只斗牛犬
浏览 454
回答 2
2回答
DIEA
用gridview属性Rows.Count取值 比如for (int i = 0; i < gvdata.Rows.Count; i++) { addxipurchbilling.Goods_id = Convert.ToInt32(gvdata.Rows[i].Cells[0].Text.ToString()); addxipurchbilling.Goods_name = gvdata.Rows[i].Cells[1].Text.ToString(); addxipurchbilling.Specifications = gvdata.Rows[i].Cells[2].Text.ToString(); addxipurchbilling.Units_of_measurement = gvdata.Rows[i].Cells[3].Text.ToString(); addxipurchbilling.PurchBilling_number = Convert.ToInt32(gvdata.Rows[i].Cells[4].Text.ToString()); addxipurchbilling.PurchBilling_unitprice = Convert.ToDecimal(gvdata.Rows[i].Cells[5].Text.ToString()); addxipurchbilling.PurchBilling_price = Convert.ToDecimal(gvdata.Rows[i].Cells[6].Text.ToString()); addxipurchbilling.Goods_barcode = gvdata.Rows[i].Cells[7].Text.ToString(); }
0
0
0
随时随地看视频
慕课网APP
相关分类
.NET
.net 中 字符串含有超链接,如何给超链接自动加上a标签?
1 回答
请问.net 中用jquery传值安全吗?
2 回答
我要回答