<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" SortExpression="id" />
</Columns>
</asp:GridView>
代码就这样
请问我如何获取那个BoundField项里面显示出来的值呢?
<Columns>
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" SortExpression="id" />
</Columns>
</asp:GridView>
代码就这样
请问我如何获取那个BoundField项里面显示出来的值呢?
解决方案 »
- c#中主窗体和子窗体
- 这个 WEB 进度条问题出在哪儿?
- form2.cs页面如何调用dataset.designer.cs中的InsertCommand
- 微软开发C#的这帮人,尼玛到底还知不知道有一种数据类型叫做无符号整型?
- c# 正则 提取
- 我在 MS 的网站上看到的 REPORTING SERVICES 怎么是 DEMO 和 TRIAL 版的? 没有正式版下么?
- 请问我要做一个类似黑洞引流的软件在c#里怎么做?
- DllImportAttribute特性中的ExactSpelling什么作用?
- axWindowsMediaPlayer1 控件怎么用?
- 图片保存为文件遇到的问题。
- 程序重新运行的办法?
- 如何在Form上面的PictureBox控件上画矩形?
{
TableCell tc = grv.Cells[0];
string s = tc.Text;
}
foreach (GridViewRow grv in GridView1.Rows)
{
TableCell tc = grv.Cells[0];
string s = tc.Text;
}
好像只对 boundField有效,如果是ButtonField或者是其他类型的就打不出来显示的内容
本人现在正在十分郁闷的赵解决方法
Button btn = tc.Controls[0] as Button;
string s = btn.Text;