Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Find Feature in DataGrid

Reply
Thread Tools

Find Feature in DataGrid

 
 
Holysmoke
Guest
Posts: n/a
 
      06-30-2004
Hi,

I just like to implement a find feature in DataGrid. And the DataGrid is paged. I found some code sample to implement a search feature. It does n't help me because they Filter the Data and show the results on the datagrid.

I don't want to implement the Filter in SQL. Consider a DataGrid having 10 Pages and I have a string "Holysmokes" in Page 5. From Page 1 If i find a that string, I should go to Page 5 and not by filtering and showing the data. I just want to move the pointer. That's it. I see a Find method in DataView object which returns the row number but don't know how to use it with Paged DataGrid.

I appreciate your help,

TIA,
Holy
 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      07-19-2004
there's no easy way around it. use the filter method of either the dataview
or the dataset. when you find the item you will have to calculate what page
it is on and move the page index to the correct page. the calculation isn't
terribly difficult since you know the index it is in the container and how
many pages the grid contains as well as how many items fit on one page.
don't forget to include the last page since all rows do not necessarily fill
up the last page and it may throw your calculation off.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"LisaConsult" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have this issue as well. Did you find a solution? Does anyone have any
>ideas?
>
> Thanks.
>
> "Holysmoke" wrote:
>
>> Hi,
>>
>> I just like to implement a find feature in DataGrid. And the DataGrid is
>> paged. I found some code sample to implement a search feature. It does
>> n't help me because they Filter the Data and show the results on the
>> datagrid.
>>
>> I don't want to implement the Filter in SQL. Consider a DataGrid having
>> 10 Pages and I have a string "Holysmokes" in Page 5. From Page 1 If i
>> find a that string, I should go to Page 5 and not by filtering and
>> showing the data. I just want to move the pointer. That's it. I see a
>> Find method in DataView object which returns the row number but don't
>> know how to use it with Paged DataGrid.
>>
>> I appreciate your help,
>>
>> TIA,
>> Holy



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
Find feature crashes FF Petros Papadopoulos Firefox 1 02-26-2005 05:27 PM
How to find IOS feature set Kin Ser Cisco 1 07-25-2003 01:52 PM



Advertisments