0
我试图通过使用以下代码来检查一个DataGridView小区的小区类型:如何检查DataGridView单元格的类型?
Private Sub DataGridView1_CellValueChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
If DataGridView1.Columns(e.ColumnIndex).Name = "ColCheck" Then
Dim cell As DataGridViewCell = DataGridView1.Rows(e.RowIndex).Cells("ColCheck")
If cell Is DataGridViewCheckBoxCell Then
End If
我得到DataGridViewCheckBoxCell
是一种类型的,不能用作表达式。
http://stackoverflow.com/questions/3167479/what-is-the-vb-net-equivalent-of-the-c -sharp-is-keyword – sdf
它的工作..谢谢。但正如你所看到的,我可能从来没有发现过这个问题,因为它的标题非常不同。发布此链接作为答案,以便我可以标记它。 – Arbaaz