Problem with DataGridColumnStyle

L

Lukas

I want to use the EndEdit function, so I need a DataGridColumnStyle
object. But I get a 'index out of range' exception when running the
line bellow:

DataGridColumnStyle dgc =
dgShowStock.TableStyles[0].GridColumnStyles[0];

I don't understand what I'm doing wrong. I tried other values then 0
for GridColumnStyles (e.g. the column number I'm trying to edit).

ps. anyone know a book in advance visual C# that you can recommend?
 
G

Guest

Have you applied a DataGridTableStyle with at least one DataGridColumnStyle to you DataGrid? If not, then there's nothing to access, hence the exception.
 

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

Top