C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




select query for dataset assingn the result in to dataset


Posted Date: 22 Nov 2008      Total Responses: 1

Posted By: jayakumar       Member Level: Gold     Points: 1



hi!
i have a dataset in c#,webapps.

how can i take the rows from the dataset using the select query with some condition.

as like the "select cloulmn1 from table",
i want like the below.
"select coulumn from Dataset where coloumn1='dfg'";.

and i want to assign the retrived rows in to new dataset,and assingn the new dataset to Gridview datasource.

could anyone helpme

Thanks in Advance.






Responses

Author: Sujit Kumar    22 Nov 2008Member Level: DiamondRating:     Points: 4

you can do it using DataView
ex:

DataSet ds=new DataSet();
//fill dataset here
DataView dv = ds.Tables[0].DefaultView;
dv.RowFilter = "cust_name like '%su%'";
gridview1.DataSource = dv;
gridview1.DataBind();



Post Reply
You must Sign In to post a response.
Next : How to count the number of checkboxes that are checked by user?
Previous : avoid redundency of records from the table
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use