search through dataSet

  • Thread starter Thread starter Hrvoje Voda
  • Start date Start date
H

Hrvoje Voda

I made a dataSet with various tables.
I have a textBox in witch I would like to write for example a name of a
person and search through dataSet to see if there is someone with that name
and if there is put some more data about that person into grid.

Hrcko
 
Hrvoje,

You cannot search through a dataset. A column of a datatable is the highest
part you can in that.

For that you can use the
Dataview.rowfilter (very efficient)
Dataview.find
Datarowcollection.find
Datatable.select

I would start as I was you with creating a new dataview and use for that a
rowfilter that has the text from the textbox. That dataview is the
datasource of your datagrid.

I hope this helps?

Cor
 
why not derive off DataSet and create a searchable DataSet as required by
the business logic

just my 2 cents

HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
 

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

Similar Threads


Back
Top