在gridview中读取订单项 [英] reading line items in gridview

查看:48
本文介绍了在gridview中读取订单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在gridview中读取每一行以及每一行中的特定单元格.

how to read each row and particular cell in each row in gridview.

推荐答案

可能将此简单代码段与Foreach一起使用.

Probably using this simple snippets with Foreach.

foreach (GridViewRow row in grid.Rows)
        {
            foreach (TableCell cell in row.Cells)
            {
                string cellValue = cell.Text.ToString();
            }

        }



投票 接受答案 (如果有帮助).



Vote and Accept Answer if it Helped.


// gv - GridView
        for (int i = 0; i < gv.Rows.Count; i++)
        {
            for (int j = 0; j < gv.Rows[i].Cells.Count; j++)
            {
                gv.Rows[i].Cells[j].Text
            }
        }


这篇关于在gridview中读取订单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆