|
-
April 27th, 2008, 08:42 PM
#6
Re: Datagridview
like the second post said;... use CODE TAGS, if you dont know what code tags are, you should read forums rules before posting.
second,
your code is setting up a datasource (bound to a datatable), but your datagridview is never set to that data.
IE, quick dirty example of setting datagridview to a datasource:
Code:
private void Form1_Load(object sender, EventArgs e)
{
DataTable _Table = new DataTable("Table1");
_Table.Columns.Add("Col1");
_Table.Columns.Add("Col2");
_Table.Rows.Add(new String[] { "Data", "Data" });
_Table.Rows.Add(new String[] { "Data", "Data" });
dataGridView1.DataSource = _Table;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|