|
-
Jun 23rd, 2008, 08:59 AM
#1
Thread Starter
Fanatic Member
Best way to do a search for a datakey in the gridview bound to objectdatasource
Hi,
I haver an objectdatasource that gets data from business logic layer through typed dataset designer and tableadapter. then I have a gridview bound to the objectdatasource in the aspx view (no code behind s been written so far)
The gridview has paging and sorting enabled. The datakey field is also a column displayed in my gridview.
I need to implement this:
On top of my web page , I have a texbox in which the user types in a value of the datakey to look for in my gridview. Then I should go through the gridview and find that searched datakey amongst the rows of my gridview (remember paging and sorting are enabled, so the searched datakey can be found in the 3rd or 4th page of the gridview).
How can I implement this with the least amount of code, pls?
p.s: pls remember that user can already select a column to sort the gridview, so i need that to be taken into consideration as well.
Thanks for your patience for reading all this
Thanks a lot for your help.
-
Jun 23rd, 2008, 02:02 PM
#2
Re: Best way to do a search for a datakey in the gridview bound to objectdatasource
Are you able to specify SelectParameters using control IDs?
-
Jun 23rd, 2008, 09:08 PM
#3
Re: Best way to do a search for a datakey in the gridview bound to objectdatasource
It sounds like your saying if key 123 is on page 4 then show page 4 in the grid with that row highlighted?
Or
you have 100 rows on 10 pages of the grid someone types in key 123 then keep the 100 rows in sorted order just display the page it's on?
You don't want to bind the results of a DB query for key 123 to your grid or sort key 123 to the top of page1?
Is that correct?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|