bindingsource.filter

Asked By shan pitt
09-Sep-10 05:54 AM
Earn up to 0 extra points for answering this tough question.
i am using bindsource to filter the records.my requirement is filtering the record of the same column which contains multiple rows.Here is the snippet:


bindingsource.filter="code='01','02'";
It throws an error.
what is the perfect syntax?
Thnx in advance

  re: bindingsource.filter

Sagar P replied to shan pitt
09-Sep-10 05:57 AM
Try something like this;

bindingsource.filter="code='01' OR code='02'";

  re: bindingsource.filter

shan pitt replied to Sagar P
09-Sep-10 06:00 AM
i want to show both 01 and 02 records.But yours only show either one

  re: bindingsource.filter

Super Man replied to shan pitt
09-Sep-10 06:07 AM
i think it should work with the OR.

try to use like this:

  bindingsource.filter = "code in ('01','02')";

 

  re: bindingsource.filter
Sagar P replied to shan pitt
09-Sep-10 06:08 AM
I am not sure but can u give try for some of the following;

bindingsource.filter="code IN ('01','02')";

Or

bindingsource.filter="code ='01';'02')";
  re: bindingsource.filter
[ Kirtan ] replied to shan pitt
09-Sep-10 06:09 AM


Write it like below


source1.Filter = "artist = 'Dave Matthews' OR cd = 'Tigerlily'";
  re: bindingsource.filter
shan pitt replied to Sagar P
09-Sep-10 06:31 AM
ITS WORKING
  re: bindingsource.filter
shan pitt replied to Sagar P
09-Sep-10 06:35 AM
Also I want to know how to filter the unique records throught this binding source
  re: bindingsource.filter
shan pitt replied to Super Man
09-Sep-10 06:41 AM
Also I want to know how to filter the unique records throught this binding source
Create New Account