asp.net - SqlDataSource Multiple Word Search -


i have following code:

 <asp:sqldatasource id="sqlinvent" runat="server" connectionstring="<%$ connectionstrings:inventconnectionstring %>" filterexpression="(descripcion '%{0}%') , model '%{4}%' , code_item '%{1}%' , desc_grupo '%{2}%' , desc_brand2 '%{3}%'"   selectcommand="select brand.code_item, item_unidad.desc_unidad, brand.descripcion, item_grupo.desc_grupo, item_tipo.desc_tipo, item_brand2.desc_brand2, brand.model brand inner join item_grupo on brand.grupo_art_id = item_grupo.grupo_art_id inner join item_brand2 on brand.brand2_id = item_brand2.brand2_id inner join item_tipo on brand.tipo_art_id = item_tipo.tipo_art_id inner join item_unidad on brand.unidad_id = item_unidad.unidad_id">  <filterparameters>                                 <asp:controlparameter controlid="txtsearch" convertemptystringtonull="false"  name="descripcion" propertyname="text" />                                 <asp:controlparameter controlid="txtsearchcod" convertemptystringtonull="false" name="searchcode" propertyname="text" />                                 <asp:controlparameter controlid="ddlsearchgrupo" convertemptystringtonull="false" name="searchgrupo" />                                 <asp:controlparameter controlid="ddlsearchbrand2" convertemptystringtonull="false" name="searchbrand2" />                                 <asp:controlparameter controlid="txtsearchmod" convertemptystringtonull="false" name="searchmodel" propertyname="text" />                              </filterparameters>                         </asp:sqldatasource> 

what do.. sqldatasource populates gridview 5,000+ items paged on 30 items each, , have 3 textboxes , 2 dropdownlist can search: description, model, code, brand , group

however since im using filterexpression follows descripcion '%{0}%' search exact word(s) in place of string.

ex. if enter in textbox red card find items red card regarding position

1 red card bla bla  red card blabla  bla bla bla red card 

what im trying do, split word , me search individually items have red , items have cards or items contains both words

red cake on oven  blue card deck  have card red 

i know if there way acomplish current aproach. have seen other questions, similar doesn't come close doing right now.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -