DataGrid

D

da

I've spent time searching the MSDN docs and Googling this, but just can't
find any decent answers to these questions:

1. Is there a way to change the text color in a forms DataGrid column?

I've seen articles allude to creating a textbox control, setting this in the
column styles, then overriding the paint method - but no clear examples.
I'm confused by this because it *seems* like the default for a column style
is text box (is that true?), but then how do you get access to the style at
runtime? This seems like a very convaluted way of doing this - is there a
simpler, more direct approach?

2. Is there a way to control the Vertical Alignment in a forms DataGrid
cell?

There doesn't seem to be an answer to this - once again, if the column style
is a "textbox", and it seems that the textbox control has no vertical
alignment property, does this mean that it's not doable? Does one have to
create a custom control to get this behavior? If so, how do you put the
custom control inside the grid?

3. Where can I find some clear examples of how to put a combobox or other
control inside a cell?

I understand this can be done either through the column styles collection,
but I've also seen an article saying you can simply add the control to the
data grid control collection? This later approach seems more
straight-forward, but can you still use this approach if you're also using
column styles?

4. Where can I find a good reference or "how to" book on the forms
datagrid?

I've been unpleasantly surprised to find that thge Windows.Forms data grid
seems to be much LESS capable than the ASP.NET datagrid. Very surprising.

Should we just punt and use a 3rd party control?

Thanks for any advise on this.

-- da
 

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