By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,084 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,084 IT Pros & Developers. It's quick & easy.

need some advice- finding rows in DataGrid

P: n/a
what I'd like to have is a simple feature to search within a column in a
DataGrid and have that the first matching row selected, then the user can
choose to search again where it will select the next matching row.

I would love a syntax where it can accept wildcards, i.e. search item name
for '%red%' to search for anything that has the word 'red' anywhere within
it.

So far my only solution was to create a new DataView for each search and do
a FilterRow for each search request, and *somehow* map the rows to the
orginial datagrid so it knows to select the right row as you iterate through
the search results (which will now be cached in this dataview) using the
Search again feature.

So any advice on how to correctly select the right row in the original
DataGrid based on a filtered DataView, or if you can think of an entirely
better solution please let me know!
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
MrNobody,

Problem is with a wildcard search that you cannot find only one item however
possible more, but lets think that is not.

I never tried this, however my first try would be to find the row in the
datatable with a datatable.select and "Like" and than use its key to do a
dataview.find to find its position.

I hope this helps?

Cor
"MrNobody" <Mr******@discussions.microsoft.com>
what I'd like to have is a simple feature to search within a column in a
DataGrid and have that the first matching row selected, then the user can
choose to search again where it will select the next matching row.

I would love a syntax where it can accept wildcards, i.e. search item name
for '%red%' to search for anything that has the word 'red' anywhere within
it.

So far my only solution was to create a new DataView for each search and
do
a FilterRow for each search request, and *somehow* map the rows to the
orginial datagrid so it knows to select the right row as you iterate
through
the search results (which will now be cached in this dataview) using the
Search again feature.

So any advice on how to correctly select the right row in the original
DataGrid based on a filtered DataView, or if you can think of an entirely
better solution please let me know!

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.