Filter does not evaluate to a boolean term

Hi there,
I'm trying to filter rows using a data view:

string pid = portfolioID;

DataView dv = new DataView(this.dtDataHubTrancheTable, pid, "portfolioId", DataViewRowState.CurrentRows);

I get an exception that pid does not evaluate to a boolean term. I checked and the values match?

Can you help?

Thanks

1 Reply

AD Administrator Syncfusion Team February 22, 2007 11:27 AM UTC

Exactly what is portfolioID? The RowFilter passed into the constructor must be a valid expression. So, it must look something like

"[colName] < 1000"

or

"[portfolioID] = 18782"

or some other string that is a valid expression that evaluates to true or false. See the MShelp on DataView.RowFilter for more information.
http://msdn2.microsoft.com/en-us/library/system.data.dataview.rowfilter.aspx

Loader.
Up arrow icon