DataGrid害人呀

98060048 2001-12-25 07:32:24
DataGrid.CurrentCell Property
msdn上都说有,可我就是找不到,会不会是我用vs.net beta2的,msdn上的是rc1或rc3的呢
还是要包含什么名字空间呢
...全文
124 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluesx 2002-01-16
  • 打赏
  • 举报
回复
Example
[ C#] The following examples show how to set and get the current cell.

[C#]
private void SetCellWithFocus(DataGrid myGrid)
{
// Set the current cell to cell1, row 1.
myGrid.CurrentCell = new DataGridCell(1,1);
}

private void dataGrid1_GotFocus(object sender, EventArgs e)
{
Console.WriteLine(dataGrid1.CurrentCell.ColumnNumber +
" " + dataGrid1.CurrentCell.RowNumber);
}
bluesx 2002-01-16
  • 打赏
  • 举报
回复
Beta2里面有DataGrid.CurrentCell这个属性的。
MSDN:
To determine which cell is selected, use the CurrentCell property. Change the value of any cell by using the Item property (DataGrid indexer), which can take either the row and column indexes of the cell, or a single DataGridCell. Monitor the CurrentCellChanged event to detect when the user selects another cell.

98060048 2001-12-27
  • 打赏
  • 举报
回复
可是我用的是Beta2不是RC2
fighters 2001-12-26
  • 打赏
  • 举报
回复
beta2的问题怎么办
fighters 2001-12-26
  • 打赏
  • 举报
回复
那就惨了。
fighters 2001-12-26
  • 打赏
  • 举报
回复
to acptvc:我用的是beta2没有啊,我直接输入编译也通不过。该怎么解决?别叫我升级。
acptvc 2001-12-26
  • 打赏
  • 举报
回复
感谢您使用微软产品。

感谢您使用微软产品。

经过实验,在RC2上 System.Windows.Forms namespace 下找到了DataGrid.CurrentCell.


微软全球技术中心 VC技术支持


本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款 (http://www.csdn.net/microsoft/terms.shtm)。


微软全球技术中心 VC技术支持


本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款 (http://www.csdn.net/microsoft/terms.shtm)。
leiwenbin 2001-12-26
  • 打赏
  • 举报
回复
这个属性是肯定有的我都用过了。
编缉器中有时候不能够自动显示出来的类成员,你直接输入就是了,bate 2 的自动完成功能有点小bug.
Dylan 2001-12-25
  • 打赏
  • 举报
回复
问题好像就是这样的。

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧