|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
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
http://dotnetjunkies.com/WebLog/bikta/articles/28215.aspx
http://msdn.microsoft.com/msdnmag/issues/03/08/DataGrids/default.aspx Both these links gives good coding samples on doing some of the things you want to do. The windows DataGrid is not the easiest to use, but when you crack it, you will find it very powerfull. Also checkout www.datagridgirl.com some nice samples there as well. |
|||||||||||||||||||||||