Dim ts1 As New DataGridTableStyle() ts1.MappingName = "Laptops"
Declare a new column style and after set its name and other properties.
Dim myDataCol As New DataGridBoolColumn() myDataCol.HeaderText = "New Column" myDataCol.MappingName = "Laptop"
Call the Add method of the GridColumnStylesCollection object to add the column to the table style
ts1.GridColumnStyles.Add(myDataCol)Call the Add method of the GridTableStylesCollection object to add the table style to the data grid.
DataGrid1.TableStyles.Add(ts1)
No comments:
Post a Comment