954,176 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Dropdown Grid Control or Grid in a combobox

Hi everyone:cool:,
I'm new in this forum. This is my first post.
Can you guys give me any idea about adding a grid control into a combobox (Windows Application)?
While developing desktop applications with C# I felt many times that it would be preety good and very useful to have a hide n peek DataGridView:idea:. User can check or make a quick search through the main table where he/she wanna choose data from;). For your reference I have seen this is available with a ERP system e.g. Microsoft Dynamics Ax. Data from the desired column of the gridview would be the "selected Item" for that combobox control. I have done adding combobox into a datagridview row. But here I wanna make the reverse.:?:
So, please help me with informations and ideas.
Any sort of help is highly appreciated. Thank you.:)

thegreymatter
Newbie Poster
1 post since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

IF you create a new form with the borderstyle set to none and have it accept a GridView in the constructor you can pass an instance of a gridview control that is created on the main form but not added to it. Then the new form can be animated in with EXAnimatedWindow api. and set the passed gridview to dock and fill the new form, then have an event that when it looses focus the new form closes and removes the gridview from the form's control collection as not to be disposed and then whatever changes and selections were made will be available via the original instance as it was only passed as a reference and not a copy.

I know this can sound complicated and it can be. But its really the only way to achieve a real drop down effect as the Show?hide method is sloppy and doesn't have a reusable drop in usability.

Sorry if i didn't explain this well. As I have done it before with the tree view and such I know it works in practice but here I have presented enough theory for you to be able to figure it out.

Diamonddrake
Master Poster
724 posts since Mar 2008
Reputation Points: 442
Solved Threads: 89
 
__avd
Posting Genius (adatapost)
Moderator
8,647 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: