all groups > dotnet windows forms databinding > may 2007 >
You're in the

dotnet windows forms databinding

group:

BindingSource.Filter


BindingSource.Filter SONET
5/8/2007 9:56:00 AM
dotnet windows forms databinding: I am currently filtering my DataGridView control using the
BindingSource.Filter.

For some reason it only works for column names with no spaces

i.e. BindingSource.Filter = "Description='Hello'";

When I use a column which is composed of two words
i.e. BindingSource.Filter = "Packet Type='Hello'";

it throws me an error saying
"Syntax error: Missing operand after 'ID' operator

Is there any way to sort using columns which are more than one word? I
can't change the column names

Re: BindingSource.Filter Bryan Phillips
5/13/2007 3:18:49 AM
Try enclosing the column name in square brackets: BindingSource.Filter
= "[Packet Type]='Hello'";

--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



[quoted text, click to view]
AddThis Social Bookmark Button