请问关于c的具体应用场景有哪些?
- 内容介绍
- 文章标签
- 相关推荐
本文共计259个文字,预计阅读时间需要2分钟。
在虚拟模式下,我有一个DataGridView。我实现了类似于http://msdn.microsoft.com/en-us/library/15a31akc.aspx中描述的CellValueNeeded事件处理程序。当您希望手动编辑单元格时,似乎只需要实现其他事件。
我在虚拟模式下有一个DataGridView.我只实现了如 msdn.microsoft.com/en-us/library/15a31akc.aspx中所述的CellValueNeeded事件处理程序.
当您希望能够手动编辑单元格时,似乎只需要实现其余事件.
我想以编程方式编辑DataGridView单元格值.
我使用以下代码尝试了这个:
DataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically; DataGridView1.BeginEdit(false); DataGridView1.Rows[0].Cells[0].Value = "testing new value"; //just using a random parameter here, not sure it is needed when editing programmatically DataGridView1.CommitEdit(DataGridViewDataErrorContexts.LeaveControl); DataGridView1.Refresh();
但没有成功:(
任何帮助,将不胜感激
使用虚拟模式时,您可以提供自己的逻辑,以将DataGridView链接到基础数据源.因此,要编辑单元格值,您应该更改基础数据源中的值,并调用Refresh刷新显示的值(这将导致为所有显示的单元格调用CellValueNeeded事件)本文共计259个文字,预计阅读时间需要2分钟。
在虚拟模式下,我有一个DataGridView。我实现了类似于http://msdn.microsoft.com/en-us/library/15a31akc.aspx中描述的CellValueNeeded事件处理程序。当您希望手动编辑单元格时,似乎只需要实现其他事件。
我在虚拟模式下有一个DataGridView.我只实现了如 msdn.microsoft.com/en-us/library/15a31akc.aspx中所述的CellValueNeeded事件处理程序.
当您希望能够手动编辑单元格时,似乎只需要实现其余事件.
我想以编程方式编辑DataGridView单元格值.
我使用以下代码尝试了这个:
DataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically; DataGridView1.BeginEdit(false); DataGridView1.Rows[0].Cells[0].Value = "testing new value"; //just using a random parameter here, not sure it is needed when editing programmatically DataGridView1.CommitEdit(DataGridViewDataErrorContexts.LeaveControl); DataGridView1.Refresh();
但没有成功:(
任何帮助,将不胜感激
使用虚拟模式时,您可以提供自己的逻辑,以将DataGridView链接到基础数据源.因此,要编辑单元格值,您应该更改基础数据源中的值,并调用Refresh刷新显示的值(这将导致为所有显示的单元格调用CellValueNeeded事件)
