You can use the TableStyles property of the DataGrid. In the designer
(Properties window) add a new TableStyle, and add the columns for that
TabelStyle. For each column you have to set the Mapping Name property
(equals to the property name of an item from your collection). The mapping
name for the TableStyle object should be set to the class name of the
collection you databind to. I use the following trick (in code):
VB.NET
TableStyle1.MappingName = myCollection.GetType.Name.ToString
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.