How do I test for a null value in DataView.RowFilter

Platform: WinForms| Category: Data Binding

You can use the IsNull operator.

[C#]
	//the outer quotes are double quotes and the inner quotes are 2 single quotes
	//Fax is the column mapping name
	this.dataView1.RowFilter = 'IsNull(Fax, ’’) = ’’';

	// for a numeric null in custNo  (suggested by Bob Gibson)
	this.dataView1.RowFilter = 'IsNull(custNo, 0) = 0';

[VB.NET]
	’the outer quotes are double quotes and the inner quotes are 2 single quotes
	’Fax is the column mapping name
	Me.dataView1.RowFilter = 'IsNull(Fax, ’’) = ’’'

	’ for a numeric null in custNo  (suggested by Bob Gibson)
	Me.DataView1.RowFilter = 'IsNull(custNo, 0) = 0'

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.