如何判断DataGridView.CurrentRow.Cells(0)的值不为空值?
- VB code
DataGridView.CurrentRow.Cells(0).Value <> NothingDataGridView.CurrentRow.Cells(0).Value <> DBNull.ValueDataGridView.CurrentRow.Cells(0).Value IsNot NothingDataGridView.CurrentRow.Cells(0).Value IsNot DBNull.Value'以上法都不,都
[解决办法]
not DataGridView.CurrentRow.Cells(0).Value is Nothing
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)
http://feiyun0112.cnblogs.com/
[解决办法]
if IsDBNull(DataGridView.CurrentRow.Cells(0).Value)=True then
end if
[解决办法]
Not IsNothing(DataGridView.CurrentRow.Cells(0).Value) Andalso DataGridView.CurrentRow.Cells(0).Value.ToString <> ""
[解决办法]
估计不是这里的错误了
把你的代码贴出来
[解决办法]
- VB.NET code
If DataGridView.SelectedRows.Count > 0 Then If Not IsDBNull(DataGridView.CurrentRow.Cells("WID").Value) Then '…… End IfEnd If
[解决办法]
- VB.NET code
If DataGridView <> Nothing Then If DataGridView.CurrentRow <> Nothing Then If DataGridView.CurrentRow.Cells <> Nothing Then If DataGridView.CurrentRow.Cells(0) <> Nothing Then If DataGridView.CurrentRow.Cells(0).Value <> Nothing Then