Drizzt109 Posted June 22, 2004 Posted June 22, 2004 Is there a way to have one column in a DataGrid display a combo box in each new row? I have a list of stocks and I'd like the DataGrid to contain a combo box with a "BUY" item and a "SELL" item for each row. Is this possible? Quote
Arch4ngel Posted June 22, 2004 Posted June 22, 2004 in the Text property of the column... you'll have to add HTML code that will suit your needs. It'll work perfectly... I did add some things like this in columns before. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Administrators PlausiblyDamp Posted June 22, 2004 Administrators Posted June 22, 2004 Have a look at this - looks like it does what you need. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Drizzt109 Posted June 22, 2004 Author Posted June 22, 2004 One thing... This looks like EXACTLY what I need, but one question if you have used this code. What is the datagridtextBox object. He never declares this and without knowing how to create it i can't add the combBox control. Thanks in advance. Have a look at this - looks like it does what you need. Quote
Drizzt109 Posted June 22, 2004 Author Posted June 22, 2004 One mroe thing... Ahh, wait, now i see where you can download his source code... Quote
Administrators PlausiblyDamp Posted June 22, 2004 Administrators Posted June 22, 2004 It is a DataGridTextboxColumn - did you download the attached zip file? It has a full working sample. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
pelikan Posted June 22, 2004 Posted June 22, 2004 While Plausibly's link show's quick hack - you might find this (using inheritance) to be a cooler, more flexible method http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/SACP_WinForms.asp Quote IN PARVUM MULTUM
pelikan Posted June 23, 2004 Posted June 23, 2004 just for record: correct link is article DataGrid: Tailor Your DataGrid Apps Using Table Style and Custom Column Style Objects Quote IN PARVUM MULTUM
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.