posts - 33,  comments - 17,  trackbacks - 2

最新评论

对了,虽然该实体类的目标框架可以是Net3.5及以上,但是编译环境必须是4.0,也就是说,如果机器上装的framework是3.5的,那么编译也会报错。
[quote]StephenJu:DataRow dataRow = (dataGridViewRow.DataBounditem as DataRowView).Row这里的ROW??有这个属性吗?[/quote] 有這個屬性,我確定
直接连到WinCE设备上
我和你们发现同样问题,你们怎么解决的???

你的发现让我给用上了,谢谢
re: UNION的使用 村蝈蝈 2008-06-30 15:48  
mark
re: 获取绑定到DataGridView中某一行的数据 要有好的心情1 2008-05-06 13:23  
“可是我们根本不用bindingSource啊,那玩意不灵活。而且明显的我绑定到DataGridView的是DataTable”

BindingSource更灵活才对,绑定到DataGridView的是DataView,不是DataTable。
re: 获取绑定到DataGridView中某一行的数据 要有好的心情1 2008-05-06 13:20  
DataRowView 是DataView中的一行,当然有Row这个属性,就是此DataRowView关联的DataRow对象。
DataRow dataRow = (dataGridViewRow.DataBounditem as DataRowView).Row这里的ROW??有这个属性吗?
楼主 能否联系一下向你学习
我用vs2008 打算开发在ce。net条件下运行的程序,用c#。net
可否同行

qq:526297422
怎么没人解答一下呢,是我的问题太幼稚,大大们不屑于解答这样的问题吗?
可是我们根本不用bindingSource啊,那玩意不灵活。而且明显的我绑定到DataGridView的是DataTable。
re: 获取绑定到DataGridView中某一行的数据 要有好的心情 2008-03-17 09:32  
DataRow dataRow = bindingSource.Current as DataRow错误,应该是
DataRowView dataRow = bindingSource.Current as DataRowView;
如果bindingSource.Current是实体对象,要转化成响应的类型,如
Customer dataRow = bindingSource.Current as Customer ;
re: 获取绑定到DataGridView中某一行的数据 要有好的心情 2008-03-17 09:29  
一般来说,在 winform 2.0 下,DataGridView推荐使用的绑定方式:
DataGridView <——>BindingSource<——>DataSource(实现IBindingList接口的集合)。
这样,DataGridView 不会直接看到 实际的DataSource,都是先看到BindingSource,再由BindingSource与具体的数据源打交道。

这本书里有详细的介绍
Data Binding with Windows Forms 2.0: Programming Smart Client Data Applications with .NET
By Brian Noyes
@要有好的心情
你好,如果那样的话,我想知道DataRow dataRow = bindingSource.Current as DataRow,能确定获取的是DataGridView中我选中的那一行的数据吗?特别是在对DataGridView排序后。
re: 获取绑定到DataGridView中某一行的数据 要有好的心情 2008-03-14 13:33  
我觉得首先应该用DataRow dataRow = bindingSource.Current as DataRow;其次再考虑使用你说的方式,不知有何见解
re: 在DataGridView中显示行号 minglei 2008-02-02 15:24  
我最近开发一个项目,遇到了一个问题:
http://zhidao.baidu.com/question/45041097.html
希望能给予我一点指示。跟DataGridView 自定义列有关。