As per your question and your provided link, if you want to do same for easy way in asp.net c# or vb.net please refer below code you will get as you want.
GridView is a server-side Data Representation control and it is intended to be manipulated at the server. While injecting JavaScript to do client-side filtering will work, still it will requires you alot of code plumbing to connect the pieces together to
make them work.
It Would Be Best If i get small example with complete code
We are not here to write complete code for your needs. That's your job. We are here to just guide you on what to do. I may provide code but minimal to the context of the question being asked. Your question and requirement is very complex and it's hard to
give you full-blown code because we also work for a living just like you and we don't have time to do it. Please note that most folks here are just a volunteer.
If you just read, follow and understand the link that you found and I provided, you should be able to learn how to do the basic and then tailor that from there to meet your requirement. Now, if you are stuck why trying to follow the tutorial, then feel free
to write your queries in the forums and make sure to follow the guidelines highlighted here:
Programming Problems and Finding Solution.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
293 Points
676 Posts
Gridview Column Filter
Aug 01, 2019 09:22 AM|Gopi.MCA|LINK
Hello
As i seen this link it has excel type filter
http://www.dotnettwitter.com/2012/08/filtering-on-each-column-in-gridview-as.html
I need filter for my gridview 30 columns like this type without postback
I need this using asp.net 2.0 C#
Can it be done via jquery or javascript without postback
Thanking You
Participant
850 Points
492 Posts
Re: Gridview Column Filter
Aug 01, 2019 10:19 AM|AddWeb Solution|LINK
Hello, Gopi.MCA
As per your question and your provided link, if you want to do same for easy way in asp.net c# or vb.net please refer below code you will get as you want.
https://www.aspforums.net/Threads/875362/Filter-GridView-with-multiple-DropDownList-in-HeaderTemplate-using-C-and-VBNet-in-ASPNet/
Thanks.
Member
293 Points
676 Posts
Re: Gridview Column Filter
Aug 01, 2019 06:14 PM|Gopi.MCA|LINK
Yes same but multi select may be possible in each column
Member
293 Points
676 Posts
Re: Gridview Column Filter
Aug 02, 2019 12:25 PM|Gopi.MCA|LINK
How to apply this to my gridview
Please check this link
https://www.jqueryscript.net/table/Excel-like-Bootstrap-Table-Sorting-Filtering-Plugin.html
Thank You
All-Star
102952 Points
19469 Posts
MVP
Re: Gridview Column Filter
Aug 02, 2019 07:12 PM|vinz|LINK
GridView is a server-side Data Representation control and it is intended to be manipulated at the server. While injecting JavaScript to do client-side filtering will work, still it will requires you alot of code plumbing to connect the pieces together to make them work.
If you really want a more responsive Grid with client-side filtering then you may want to take a look at Bootstrap grid or DataTables instead: https://datatables.net/extensions/fixedheader/examples/options/columnFiltering.html
Microsoft MVP, CodeProject MVP, C# Corner MVP
Blog | Twitter | Linkedin
Member
293 Points
676 Posts
Re: Gridview Column Filter
Aug 03, 2019 05:30 AM|Gopi.MCA|LINK
Hello Vinz
Thank You For Your Reply
It Would Be Best If i get small example with complete code
So that in future it will be useful for others as well
Thanking You
Member
293 Points
676 Posts
Re: Gridview Column Filter
Aug 05, 2019 04:31 AM|Gopi.MCA|LINK
It would be very helpful if any one give me this complete code it will help other as well
I seen this link i want this same
https://www.jqueryscript.net/table/Excel-like-Bootstrap-Table-Sorting-Filtering-Plugin.html
In gridview or repater anything is okay
Thank you
All-Star
102952 Points
19469 Posts
MVP
Re: Gridview Column Filter
Aug 05, 2019 04:37 PM|vinz|LINK
We are not here to write complete code for your needs. That's your job. We are here to just guide you on what to do. I may provide code but minimal to the context of the question being asked. Your question and requirement is very complex and it's hard to give you full-blown code because we also work for a living just like you and we don't have time to do it. Please note that most folks here are just a volunteer.
If you just read, follow and understand the link that you found and I provided, you should be able to learn how to do the basic and then tailor that from there to meet your requirement. Now, if you are stuck why trying to follow the tutorial, then feel free to write your queries in the forums and make sure to follow the guidelines highlighted here: Programming Problems and Finding Solution.
Here's one that I found that uses GridView: http://www.dotnettwitter.com/2012/08/filtering-on-each-column-in-gridview-as.html
Good luck.
Microsoft MVP, CodeProject MVP, C# Corner MVP
Blog | Twitter | Linkedin
Contributor
3370 Points
1409 Posts
Re: Gridview Column Filter
Aug 06, 2019 11:05 AM|samwu|LINK
Hi Gopi.MCA,
According to your requirements, here is a demo for your reference.
In the listbox SelectedIndexChanged event, I filtered the data base on select value.
And then call the SelectedIndexChanged event in jquery for multiple select.
The result:
Best regards,
Sam
Member
293 Points
676 Posts
Re: Gridview Column Filter
Aug 13, 2019 08:41 AM|Gopi.MCA|LINK
Thank you so much for your code.
If its difficult to achieve this
http://www.dotnettwitter.com/2012/08/filtering-on-each-column-in-gridview-as.html?m=1
in gridview can we with any others control
Thank You
Contributor
3370 Points
1409 Posts
Re: Gridview Column Filter
Aug 15, 2019 07:05 AM|samwu|LINK
Hi Gopi.MCA,
If you want to do the style you want, you can only use some special plugins.
such as bootstrap-multiselect or sumoselect etc , and you want to filter the gridview without postback.
I suggest you try to use javascript . Here's a demo you can use as a reference.
https://www.aspforums.net/Threads/117836/Filter-GridView-using-javaScript-in-ASPNet/
Best regards,
Sam