datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
You need to apply a DataGridTableStyle

DataGridTableStyle tableStyle = new DataGridTableStyle("myTable")
DataGridTextBoxColumn colStyle = new DataGridTextBoxColumn()

colStyle.MappingName = "id_name"
colStyle.HeaderText = "firstname"

tableStyle.GridColumnStyles.Add(colStyle)

dataGrid1.TableStyles.Add(tabStyle);
 
Oops..

First line should be changed t

DataGridTableStyle tableStyle = new DataGridTableStyle()
tableStyle.MappingName = "myTable"

This is why I code in an IDE and not Internet Explorer :)
 
Do you know if it's possible to use different font for the headertext for different column? and how to achive that?

Thanks

Henry
 
The stock datagrid doesn't have that capability; you are limited to changing the font on all column headers at once

Your best bet would be to derive a control from datagrid and draw the headers yourself. You may also be able to find someone who has already done this. There is no shortage of customized datagrids floating around the internet, many of them for use without charge

Charlie
 

Ask a Question

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.

Ask a Question

Back
Top