NULL Values in DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I handle Null values in a DataGrid so the grid won't display 'null' if
the field data is empty/null?
The following SQL statement returns an error message "Invalid number of
arguments..."
SELECT MyField1, IsNull(MyField2, 'na') as MyField2 from MyTable
 
Hi,

Add a tablestyle to your datagrid.

http://msdn.microsoft.com/library/d...ry/en-us/dnwinforms/html/wnf_custdatagrid.asp

http://msdn.microsoft.com/library/d...tingwindowsformsdatagridvisualbasicprimer.asp

Set the datagrid columns null text

http://msdn.microsoft.com/library/d...ormsdatagridcolumnstyleclassnulltexttopic.asp

Ken
-----------------
How do I handle Null values in a DataGrid so the grid won't display 'null'
if
the field data is empty/null?
The following SQL statement returns an error message "Invalid number of
arguments..."
SELECT MyField1, IsNull(MyField2, 'na') as MyField2 from MyTable
 
Back
Top