How to programmatically configure a dynamic DataGrid's look

G

Guest

Hi

I'm creating Datagrids on the fly and need to be able to set header and item styles. So I tried this

DataGrid selectedsGrid = new DataGrid()
TableItemStyle hStyle = new TableItemStyle()
hStyle.BackColor = Color.FromArgb(220, 214, 188)
selectedsGrid.HeaderStyle= hStyle

But it seems that hStyle is read only... What is the proper way to do this

It seems that working with dynamic datagrids is not well supported in .net. or am I just missing something

Thanks for your help
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top