burak Posted March 15, 2004 Posted March 15, 2004 Hello, When I run my windows application, the data grid comes up with a "+" in it. When you click that, it lists the data table name. And then if you click this, it finally lists the contents of the dataset. How can I have the datagrid display its contents from the very start, instead of having to click the "+" and the data table name? Thank you, Burak Quote
Administrators PlausiblyDamp Posted March 15, 2004 Administrators Posted March 15, 2004 Set the datasource to the dataset's table i.e. DataGrid1.DataSource = ds.tables(0) Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
burak Posted March 15, 2004 Author Posted March 15, 2004 Set the datasource to the dataset's table i.e. DataGrid1.DataSource = ds.tables(0) Thanks this helped out a lot. :) Quote
burak Posted March 15, 2004 Author Posted March 15, 2004 Set the datasource to the dataset's table i.e. DataGrid1.DataSource = ds.tables(0) Do you know how to set the header names in the data grid? For some reason, if you say "select CRS_TITLE as Title..." it does not work. I found this code but it didn't work. Dim gs As New DataGridTableStyle Dim cs As DataGridColumnStyle cs.MappingName = "CRS_TITLE" cs.HeaderText = "Title" gs.GridColumnStyles.Add(cs) dtg.TableStyles.Add(gs) dtg.Refresh() Thanks, Burak Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.