Saturday, March 31, 2012

Text Box to search contents in a Gridview Control

Hello,
I have seen several examples with a dropdownlist filtering the results in a
gridview.
Is there a way to have information typed in a text box used to filter a
gridview?
I would like to for example search on a persons first name and any first
name that contains the contents of my text box appear in the gridview list.The datasource object selectParameters allows you to use the ControlParamete
r
against a TextBox, e.g.
<asp:ControlParameter ControlID="txtCustomer" Name="CustomerID"
PropertyName="Text" Type="String" />
This sample uses a dropdownlist box:
http://www.webswapp.com/CodeSamples...ridView_2c.aspx
and this sample does the same exact filtering using a TextBox:
http://www.webswapp.com/CodeSamples...ridView_3c.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"mimo" wrote:
> Hello,
> I have seen several examples with a dropdownlist filtering the results in
a
> gridview.
> Is there a way to have information typed in a text box used to filter a
> gridview?
> I would like to for example search on a persons first name and any first
> name that contains the contents of my text box appear in the gridview list.[/color
]

0 comments:

Post a Comment