I have a table that have fields First_name, Last_name, city and country.
In a form I want that the user be able to do a search with these field. The user must be able to search by the fields that he want to search by and he can search by the number of the fields that he want. For example he can search by the field First_name and City. Or by the Last_name and Country, or simply by city.
I saw that I can use 3 ways..(but i'm not sure that it's the right way to use these so if not, tell me please)
I saw that I could use these ways:
the Find method on the DataRowCollection object,
the Select method of the DataTable object
And the FindRows methods on the DataView object.
I would like to know which is the best to use...and also how to use it as I'm pretty new with .net...
I also want to display all records retreived in a datagrid...
If somebody could give me an example of how to use the best way I will realllllllyyyy appreciate!!
Thanks in advance.
In a form I want that the user be able to do a search with these field. The user must be able to search by the fields that he want to search by and he can search by the number of the fields that he want. For example he can search by the field First_name and City. Or by the Last_name and Country, or simply by city.
I saw that I can use 3 ways..(but i'm not sure that it's the right way to use these so if not, tell me please)
I saw that I could use these ways:
the Find method on the DataRowCollection object,
the Select method of the DataTable object
And the FindRows methods on the DataView object.
I would like to know which is the best to use...and also how to use it as I'm pretty new with .net...
I also want to display all records retreived in a datagrid...
If somebody could give me an example of how to use the best way I will realllllllyyyy appreciate!!
Thanks in advance.