Click here to Skip to main content
15,351,370 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Most search features of grid view in ASP.NET shows how to search data from a data list that is connected to a database. But my data in my gridview is list of name of books from a folder. It uploads files from folders and save them on visual studio folder, not database. Now I want to search data from the gridview but all solutions are talking about how to search from database. Your help contributes a lot for my web app. I am almost on the last stage to launch it. Thanks.

What I have tried:

I have tried to use datatable javascript (DataTable is a plug-in for the jQuery Javascript library). But since I have another gridview in the same page, the search and other functionalities don't work on the second gridview (That is also another problem to be addressed. Solution is appreciated). That is why I want to use another searching method.
Posted
Updated 5-Feb-22 12:01pm

1 solution

You are looking at it backwards. The GridView, as the name implies, is a view into the data. So you filter/search the data and display the results in the GridView.

UPDATE

I did a quick Google Search and found this: Search records in GridView and highlight results in ASP.Net using C# and VB.Net

UPDATE #2

There are many links in that search (link provided), I just chose the first that looked remotely like it could help. Look at the others...

Here is another in that search, right here on CodeProject: ASP.NET GridView with search option (SearchableGridView)
   
v4
Comments
Tinsae Teku 5-Feb-22 18:05pm
   
Dear @Graeme_Grant you are right. But it is known that it is possible to search data from a grid view. My problem is doing that, but not from database. So do you think that is impossible?
Graeme_Grant 5-Feb-22 18:40pm
   
See the update in the solution
Tinsae Teku 5-Feb-22 18:45pm
   
This is still searching from database. I don’t have any database. My storage folder is a folder in the visual studio. It is a collection of books uploaded within this system itself. So no database or table.

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