|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
to find a client by name or phone number (both are string format) . Even if I know the value exist, the datagrid return me nothing. Any Idea what would be the problem ?? Thanks in advance !! Esperanza //--------------------------------------------------------------------- private void btnLookFor_Click(object sender, System.EventArgs e) { string strVar; string strSelection; strVar = this.txtLookFor.Text; strSelection = this.RadListLookFor.SelectedItem.Text; try { if (strVar.Trim()!=null) { //See witch radio button was click switch(strSelection) { //Look by name case "Name": this.dataViewGPPL.RowFilter = "XABALPH like '%" + strVar + "%'"; break; //Look by phone number case "No tel.": this.dataViewGPPL.RowFilter = "XTEL like '" + strVar + "'"; break; } this.DataGrid1.DataSource = dataViewGPPL; this.DataGrid1.DataBind(); } } catch (Exception ex) { throw ex; } Hi Esperanza,
How do you fill whole data to the dataview? >-----Original Message----- which allow the user>Hello .net expert, I've made a litle reserch function >to find a client by name System.EventArgs e)>or phone number (both are string format) . > >Even if I know the value exist, the datagrid return me nothing. >Any Idea what would be the problem ?? >Thanks in advance !! > >Esperanza > >//-------------------------------------------------------- ------------- >private void btnLookFor_Click(object sender, Show quoteHide quote > { > > string strVar; > string strSelection; > strVar = this.txtLookFor.Text; > strSelection = this.RadListLookFor.SelectedItem.Text; > > try > { > if (strVar.Trim()!=null) > { > //See witch radio button was click > switch(strSelection) > > { > //Look by name > case "Name": > this.dataViewGPPL.RowFilter = "XABALPH like '%" + strVar + "%'"; > break; > > > //Look by phone number > case "No tel.": > this.dataViewGPPL.RowFilter = "XTEL like '" + strVar + "'"; > break; > } > > this.DataGrid1.DataSource = dataViewGPPL; > this.DataGrid1.DataBind(); > > } > > > } > > catch (Exception ex) > { > throw ex; > } > > > >. > That was it.
I didn't fill the dataSet before. Thanks a lot !! Esperanza Show quoteHide quote "Elton Wang" <anonym***@discussions.microsoft.com> a écrit dans le message de news:39e301c51f63$faa778f0$a401280a@phx.gbl... > Hi Esperanza, > > How do you fill whole data to the dataview? > > > >-----Original Message----- > >Hello .net expert, I've made a litle reserch function > which allow the user > >to find a client by name > >or phone number (both are string format) . > > > >Even if I know the value exist, the datagrid return me > nothing. > >Any Idea what would be the problem ?? > >Thanks in advance !! > > > >Esperanza > > > >//-------------------------------------------------------- > ------------- > >private void btnLookFor_Click(object sender, > System.EventArgs e) > > { > > > > string strVar; > > string strSelection; > > strVar = this.txtLookFor.Text; > > strSelection = this.RadListLookFor.SelectedItem.Text; > > > > try > > { > > if (strVar.Trim()!=null) > > { > > //See witch radio button was click > > switch(strSelection) > > > > { > > //Look by name > > case "Name": > > this.dataViewGPPL.RowFilter = "XABALPH like '%" + > strVar + "%'"; > > break; > > > > > > //Look by phone number > > case "No tel.": > > this.dataViewGPPL.RowFilter = "XTEL like '" + > strVar + "'"; > > break; > > } > > > > this.DataGrid1.DataSource = dataViewGPPL; > > this.DataGrid1.DataBind(); > > > > } > > > > > > } > > > > catch (Exception ex) > > { > > throw ex; > > } > > > > > > > >. > >
Default Paging
Background of datagrid Inserting Text before the Numberic Page numbers in paging Changing paging look moving data from a page to an other page TemplateColumn with CheckBox DataBind in C# recursive relation in datagrid Disable button in datagird on condition Problem editing checkbox template column Need some hints before starting to change a page |
|||||||||||||||||||||||