Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In gridview Header Template can set in Filter Parameters in search for TextBox1 in bind values in gridview.

For Example_1
XML
<HeaderTemplate>
<asp:Label ID="Label14" runat="server" Text="StatusId"></asp:Label>
<br />
 <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
   </HeaderTemplate>



It's working
XML
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:printapp_apr_2ConnectionString %>" SelectCommand="gridFill" FilterExpression="(fileName like '{0}%' or '{0}' ='-1') AND (fileDetails like '{1}%' or '{1}' ='-1') AND (createdOn='{2}' or '{2}'='-1') AND (statusName ='{3}' or '{3}' ='-1') " SelectCommandType="StoredProcedure">
   <FilterParameters>
   <asp:ControlParameter Name="fileName" ControlID="TextBox6" PropertyName="Text" Type="String" DefaultValue="-1" />
   <asp:ControlParameter Name="fileDetails" ControlID="TextBox7" PropertyName="Text" Type="String" DefaultValue="-1" />
     <asp:ControlParameter Name="createdOn" ControlID="TextBox8" PropertyName="Text" Type="String" DefaultValue="-1" />
     <asp:ControlParameter Name="statusName" ControlID="DropDownList1" PropertyName="SelectedValue" Type="String" DefaultValue="-1" />
   </FilterParameters>
</asp:SqlDataSource>

Can able to use in HeaderTemplate in filterParameters in gridview in textbox...

<pre><HeaderTemplate Name="fileName" ControlID="TextBox6" PropertyName="Text" Type="String" DefaultValue="-1" />


there any possible to search in HeaderTemplate in gridview
Posted
Updated 16-Apr-13 21:34pm
v2
Comments
Vani Kulkarni 17-Apr-13 2:37am    
Please elaborate your question. Its unclear.
Rasik Banta 17-Apr-13 2:48am    
Please elaborate your query for better understanding
Rekhash 17-Apr-13 5:20am    
@Vani Kulkarni
Ya.. i elaborate my question.
Rekhash 17-Apr-13 5:20am    
@Rasik Banta
Ya.. i elaborate my question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900