C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

Bind a multiple rows in a datagrid view


Posted Date: 04 Nov 2009      Posted By: SuganyaCMR      Member Level: Gold     Points: 1   Responses: 4



hi,

how to bind a multiple rows in a datagrid view?.
give me some samples.

Iam not asking binding datagrid using fill method.

Regards,
Suganya

In order to succeed, you must first be willing to fail!
Rate my post!.If u found useful





Responses

Author: VijayaShankar    04 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Your Question is not Clear. Please elabrate. You want with out fill method of dataadapter or.


Author: Lakhan Pal    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi SuganyaCMR -

Can you please explain your question by giving little bit more explanation?

Please rate this answer if it helped you.
Thanks & Regards
Lakhan Pal Garg
Free Code Snippets



Author: raviranjan singh    14 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

if u dont want to use fill method than u can bind your gridview ..row by row..


Author: Selvam    14 Nov 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

hi yar,

if u r using dataGridView ,so u can get the values from Database..no need of add each n every row..according to the query ,it will retrive the values from database and store it in Dataset.if its contain more than one row it ill fetch automatically.

For ex:

SqlDataAdapter sqData = new SqlDataAdapter("select DeptName from Department", con);
DataSet dSetForGrid = new DataSet();
sqData.Fill(dSetForGrid);
dataGridView1.DataSource = dSetForGrid.Tables [0].DefaultView;
dataGridView1.DataSource = dt.DefaultView;



Post Reply
You must Sign In to post a response.
Next : To make checkbox checked
Previous : setup for windows application that usesAsp.net2005&SQLSERVER2005
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use