Problem with DataGrid in VB.NET 2003

  • Thread starter Thread starter Atley
  • Start date Start date
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
 
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
 
Back
Top