How to Bind Controls in GridView in VB.Net or C#.Net (Windows Application)
How to Bind Controls in GridView in VB.Net or C#.Net (Windows Application)Can anyone help me
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Scott LyslePosted Apr 7, 2008, 1:13 AM
Here is the easiest way I can think of. Add a datagridview control to a windows form; open the smart tag (upper right hand arrow icon) and then select the option to dock the control into the parent container. Go back to the smart tag and select the combobox that is labeled, "Chose DataSource". When the combobox opens, select the option to add a new project datasource. When the dialog opens, select the database option and then select next. When the next option appears, either select an existing connection or select an existing connection. Follow the rest of the directions to identifiy the table and columns that will appear in the datagridview control.
Build it and run it; you will see your data appear in the grid.