社区
C#
帖子详情
datagridview 编辑cell里的值后,怎么取
gadev
2009-03-04 09:48:46
dgr.Cells[8].Value.ToString();
这样取到的值还是更改前的
请教
谢谢
...全文
180
11
打赏
收藏
datagridview 编辑cell里的值后,怎么取
dgr.Cells[8].Value.ToString(); 这样取到的值还是更改前的 请教 谢谢
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
11 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Galllop
2009-03-05
打赏
举报
回复
默认是这样的,总有办法解决的
lf44785170
2009-03-05
打赏
举报
回复
光标不离开单元格,Value是不会变的
gadev
2009-03-05
打赏
举报
回复
up
gadev
2009-03-05
打赏
举报
回复
up
limpid_123
2009-03-04
打赏
举报
回复
先定义一个修改属性,执行该方法,进行数据更新之后再次绑定数据。
Galllop
2009-03-04
打赏
举报
回复
BindingSource bf = new BindingSource() ;
gadev
2009-03-04
打赏
举报
回复
limpid_123 的方法 也没有的
gadev
2009-03-04
打赏
举报
回复
limpid_123 的方法 我试试
gadev
2009-03-04
打赏
举报
回复
我用的winform
没有这样的用法的
limpid_123
2009-03-04
打赏
举报
回复
OnRowUpdating="GridView1_RowUpdating"
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
limpid_123
2009-03-04
打赏
举报
回复
<asp:TemplateField HeaderText="userpwd">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("userpwd") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("userpwd") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
string userpwd = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[1]).Text.ToString().Trim();
C#
编辑
时获
取
datagridview
的
cell
内容
C#
datagridview
利用keyup事件,EditingControlShowing事件,来实时捕获正在
编辑
的单元格的内容 说明: 1、添加
datagridview
的EditingControlShowing事件, 2、在EditingControlShowing事件中在添加keyup事件...
DataGridView
CheckBoxColumn的Value
值
和EditFormatedValue
值
不一致
今天要做一个代码修改
DataGridView
CheckBoxColumn的Value
值
然后再遍历获
取
DataGridview
选中项,因为遍历的时候为了能获
取
跟界面一致的选项,所以判断是否选中使用的是EditFormatedValue,所以出现了一个问题: ...
如何
取
DataGridView
CheckBox
Cell
值
网上有提到使用EditedFormattedValue和FormattedValue的
值
的判断,但使用起来还是麻烦,要做判断,于是想到用点选后马上结束
编辑
状态,结果还变好用的,上代码,以备后用: /// /// 选择内容
C#----判断
DataGridView
中CheckBox的
值
private void
dataGridView
1_
Cell
ContentClick(object sender,
DataGridView
Cell
EventArgs e) { if (e.ColumnIndex == 0 && e.RowIndex != -1) {
DataGridView
CheckBox
Cell
...
C#
DataGridView
ComboBoxColumn下拉框判断当前所选择的
值
DataGridView
ComboBoxColumn下拉框判断当前所选择的
值
DataGridView
.Rows[].
Cell
[].EditedFormattedValue;
C#
111,126
社区成员
642,541
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章