c# - BindingSource.Filter ignoring one of my conditions -


i have bindingsource filter multiple conditions. reason have single search_textbox find specific record...

i have 1 problem though, have more permanent condition"status '{0}' and...", once type anything, restriction ignored. assumed 'and' take care of that, apparently mistaken.

bs.filter = string.format("status '*{0}*' , customer_code '*{1}*' or customer_name '*{1}*' or customer_jobnumber '*{1}*' or customer_date '*{1}*' or order_number '*{1}*'", select, textbox1.text); 

any advice? kindly

herman vercuiel

edit:

sorry, should have mentioned recurring inside textchanged event..

don't need add couple of parenthesys around conditions?

bs.filter = string.format("status '*{0}*' , ( customer_code '*{1}*' " +                            "or customer_name '*{1}*' or customer_jobnumber '*{1}*' " +                            "or customer_date '*{1}*' or order_number '*{1}*')",                            select, textbox1.text); 

to mean status '*<select>* , (one or more following condition true)


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -