Problem with DataGrid in VB.NET 2003

A

Atley

I am populating a datagrid from a SQL statement and I want to assign column
headers and column widths to the grid. I cannot seem to get it working.
The SELECT statement that populates the DataGrid changes from time to time
so this needs to be reapplied from time to time. Any help would be
appreciated.

Thanks,
Atley
 
A

Atley

Thank you so much, this lead to me setting the mapping name to:
If sqlDataToList = "" Then sqlDataToList = "Select CName, CUDate, CTLength
FROM ClientData ORDER BY CName"
Dim cnMyGridLoader As New System.Data.SqlServerCe.SqlCeConnection("data
source =\my documents\clientbase\clientbase.sdf")
Dim daMyGridLoader As New
System.Data.SqlServerCe.SqlCeDataAdapter(sqlDataToList, cnMyGridLoader)
Dim dsMyGridLoader As New System.Data.DataSet

daMyGridLoader.Fill(dsMyGridLoader)
Dim tsMovieList As New DataGridTableStyle
tsMyTableSet.MappingName = dsMyGridLoader.Tables(0).TableName


That lead to the rest of my code working, thank you so much.... I really
appreciate your assistance in this piece. There seems to be a large
learning curve here as apposed to other version changes of VB.

Thank you again,
Atley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top