Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# DataGridViewCellEventArgs行为?_C#_.net_Winforms_Datagridview - Fatal编程技术网

C# DataGridViewCellEventArgs行为?

C# DataGridViewCellEventArgs行为?,c#,.net,winforms,datagridview,C#,.net,Winforms,Datagridview,从Microsoft读取C文档时 我不知道属性RowIndex什么时候应该返回-1 当绑定到DataGridView.CellValueChanged事件并更新DataGridViewTextBoxColumn更新一个列标题时,我遇到了这种情况 不知何故,这是有道理的,但是否有一些关于这种行为的更强有力的文档或规范 DataGridViewCellEventArgs从DataGridViewCell获取行索引 文件说明: 包含单元格的行的索引-如果没有所属行,则为1 当RowIndex属性返回-

从Microsoft读取C文档时

我不知道属性RowIndex什么时候应该返回-1

当绑定到DataGridView.CellValueChanged事件并更新DataGridViewTextBoxColumn更新一个列标题时,我遇到了这种情况


不知何故,这是有道理的,但是否有一些关于这种行为的更强有力的文档或规范

DataGridViewCellEventArgs从DataGridViewCell获取行索引

文件说明:

包含单元格的行的索引-如果没有所属行,则为1

当RowIndex属性返回-1时,单元格要么是列标题,要么共享单元格的行

类似的情况也发生在美国

包含单元格的列的索引-1如果单元格不包含在列中

包含行标题的行的列索引的值为-1