need some advice- finding rows in DataGrid

G

Guest

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!
 
C

Cor Ligthert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top