I'm sure this can be done, but can it be done easily?
For example:
vb.net Code:
Class ColumnData Private _ColName as String Private _Data as String Property ColName as String Get Return _ColName End Get Set(ByVal value as String) _ColName = value End Set End Property Property Data as String Get Return _Data End Get Set(ByVal value as String) _Data = value End Set End Property End Class Claas RowData Private _RowName as String Property RowName as String Get Return _RowName End Get Set(ByVal value as String) _RowName = value End Set End Property Public ColumnBL as new BindingList(Of ColumnData) End Class Public RowBL = new BindingList(Of RowData)
How would I build a data-bound DataGridView with the column names coming from the ColumnData, Row Names from the RowData and the values from the RowBL(row).ColumnBL(column).Data
I know how to create DataSources bound to objects, but I have only done it with fixed columns. How do I add columns on the fly and data-bind each cell properly?
Thanks for your help with this!
-Andy.




Reply With Quote