Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quickly find the information on the GridView ?
03-12-2015, 06:01 AM
Post: #1
Not Solved Quickly find the information on the GridView ?
See attached image file: [Image: urFBbz.jpg]

assuming the data is loaded from SQL Server GridView includes 5 columns as shown above, cells Search of textbox where you find out quickly (due to its use on the image for illustration), in his cell this search textbox enter any value in the column that has (according to this column 5), the GridView grid lines present value of the lookup value, usually looking to have a value equal to 1 column with which to look, if you use fast search method does not need to specify one column before it, how to write this quickly find how to load into the GridView ?

03-12-2015, 09:31 AM
Post: #2
Not Solved RE: Quickly find the information on the GridView ?
If you want to search the "Name" column from Grid based on searched text, then first step to get the SQL Server data to DataTable and make sure DataTable is a global object so we can able to access on different methods.

Then write a simple method like that.
private void Fill_Grid_With_Searched_Text()
DataView dv = new DataView(dtSearch);
dv.RowFilter = "cust_Name like '" + txtSearch.Text + "%'";
grvCustomer.DataSource = dv;
dtSearch is actually your DataTable which loaded with SQL Server Records
cust_Name is the Database Column Name

And call this method in TextChange event of Searching Textbox.

This looks a faster way to search. Other way is to query from database every time.

[Image: 2604595733.png]
03-13-2015, 07:05 AM
Post: #3
Not Solved RE: Quickly find the information on the GridView ?
Thank you very much

Possibly Related Threads...
Thread: Author Replies Views: Last Post
  Get Local system drive information from asp.net after hosting. gopal_nivas 4 4,143 09-21-2011 11:52 AM
Last Post: nisar87
  [General]  Need information about POS? praveen 4 2,358 02-11-2011 04:01 PM
Last Post: Rajesh Kumar Parbat
  share information : load test of website nisar87 1 1,727 09-29-2010 10:19 AM
Last Post: Rajesh Kumar Parbat
  SEO information nisar87 2 1,713 09-16-2010 09:19 AM
Last Post: kumar.netobject2010

User(s) browsing this thread: 1 Guest(s)