Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 29, 2012 12:39 AM by Decker Dong - MSFT
Nov 28, 2012 12:13 PM|LINK
Let me introduce myself, my name is John from PR. I am kinda new with ASP.NET and C#. I have base knowledge since I have worked with HTML, PHP, CSS, JS.
What I am trying to do is a GridView that can be filtered by different columns.
I already did a searchable GridView with one textbox. But, when it comes to make it with multiple textboxes, it's kind of confusing to me.
Hope someone can give me a path to start!
We have a GridView with 3 columns (size, color, weight). I want let the user to search(filter) for an exact size, color or weight.
Thanks in advance,
Nov 28, 2012 12:20 PM|LINK
Check the following questions, you may get some idea
Nov 28, 2012 12:26 PM|LINK
Thanks for the link, but I wanted to do the code by myself since Im new at this. Looks great, but seems that I have to pay for it.
Nov 28, 2012 12:49 PM|LINK
Nov 28, 2012 02:05 PM|LINK
Thanks for your respond guys.
This is actually what I have done by now:
CONTAINER NUMBER: <br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
ITEM NUMBER: <br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Show" />
protected void Button1_Click(object sender, EventArgs e)
string CONTAINER_NUMBER = TextBox1.Text;
string ITEM_NUMBER = TextBox2.Text;
SqlDataSource2.SelectCommand = "SELECT * FROM [LOADING_TABLE] WHERE [CONTAINER_NUMBER] = @CONTAINER_NUMBER)";
What am I doing wrong?
Nov 28, 2012 07:23 PM|LINK
This page helped me a lot:
I am making some tests but I think that I will have what I need soon!
Thanks for your time!
Nov 29, 2012 12:39 AM|LINK
Filter GridView with multiple Textboxes
In fact I think you need a Customized Control that can help you to achieve the task of dynamically creating Search filtering conditions, so you can just try this demo, which will help you to add numerous conditions to filter out the records that you wanna
fetch from db.