Convert to a string
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
-
hi, how to convert an existing data in database to a string, in DataGrid " i need something similar to : lstV.SubItems.Add(dt.Rows(i)("MTimeIN").ToString) which is used in list view" i need it in dataGrid using vb2003 thank you srour_costavo@hotmail.com
I hope I'm understanding the question correctly... You want to replace the functionality of adding items to a ListView to an equivilent of adding items to a DataGrid, correct? A DataGrid doesn't maintain collections of objects like a list view does. It's bound to datasources that maintain those collections. So, create a DataTable object with a DataColumn, add your items to that table and bind the DataGrid to that DataTable.
Dave Kreskowiak Microsoft MVP - Visual Basic