Searching in a dataset or datatable...

Posted by Gopal_nivas under ASP.NET on 7/1/2010 | Views : 5133 | Status : [Member] | Replies : 3
hi..

i am having gridview .. in that i was binded my xml file value..

then the xml values are in dataset..

after tat i have a textbox .. in tat textbox i gave a value like "pipe"

then i cliked a button the i want to search a particular column (i.e product) in a dataset
if it matches that word in tat column in dataset then i want to display that particular value in gridview...

need ur suggestions

regards
gopal.s




Responses

Posted by: Raja on: 7/1/2010 [Member] Starter

Up
0
Down
Read this article, it covers almost everything you can do with DataTable http://www.dotnetfunda.com/articles/article131.aspx

DataSet is nothing but the collection of DataTable, so you can perform this in the datatable inside DataSet.

Hope this will help

Regards,
Raja, USA

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: BangaruBabu on: 7/2/2010 [Member] Starter

Up
0
Down
Hi,Check These Links http://devcity.net/Articles/56/1/dataset_srch_xml.aspx and http://www.akadia.com/services/dotnet_find_methods.html

And One More i suggest u ,Take the data into DataView--from That place we Can Search according to Our Requirement



BangaruBabu Pureti
http://bangarubabupureti.spaces.live.com/

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhilan on: 7/2/2010 [Member] Starter

Up
0
Down
DataTable table = DataSet1.Tables["Orders"];
string expression;
expression = "columnname="pipe";
DataRow[] tmprows;
tmprows = table.Select(expression);

bind into gridview


Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response