This is a migrated thread and some comments may be shown as answers.

MultiColumnCombo on ToolStrip

4 Answers 176 Views
Toolstrip (obsolete as of Q3 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MikeB
Top achievements
Rank 1
MikeB asked on 13 Jul 2009, 06:36 PM
Hi,

Is it possible to add a MultiColumnCombo to a ToolStrip Element?

Thanks,
Mike

4 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 14 Jul 2009, 04:32 PM
Hi MikeB,

I would suggest not adding a multi-column combobox to RadToolStrip since the toolstrip items are still using the old layout system and you will experience undefined behavior. Please provide more details on what you need to achieve so that I may provide an alternative solution.

I am looking forward to your reply.

Regards,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
MikeB
Top achievements
Rank 1
answered on 14 Jul 2009, 04:54 PM
Victor,
Thanks for the response.  I am working on an application that has many infragistics controls.  And I am trying to replace them with Telerik controls.  In the process, we want to change the functionality, that the users have become accustomed to, as little as possible.  One of the controls is a ToolStrip Item that has several controls on it.  Two of them are MultiColumn Combo Boxes.  I have replaced them with a single column Combo Box but this change has not been released yet.  I'm sure that, if it is released this way, the users will ask why they can't have the same functionality that they had.

The current multiColumnCombo Boxes are displaying (when the drop down is exposed) a value with a description.  The values alone are not very descriptive, but once selected the value is understood by the user and is displayed in the combo box.  And it is highly unlikely that we can change the values.  So I need to be able to duplicate this.

I would prefer to not keep the old ToolStrip. 

Edit: I tried (but could not) attached a screen shot of our current form.  I can send it to you if it will help.

Thanks,
Mike


0
Victor
Telerik team
answered on 17 Jul 2009, 01:44 PM
Hello Mike,

After some struggle I managed to make RadMultiColumnComboBox and RadToolStripItem to live together. Here is what you need to do:
// Create the combo box and the RadHostItem which contains it.  
RadMultiColumnComboBox multiColumn = new RadMultiColumnComboBox();  
RadHostItem h = new RadHostItem(multiColumn);  
h.MinSize = multiColumn.Size;  
h.AutoSize = true;  
// Add the host item to the toolstrip item.  
this.radToolStripItem1.Items.Add(h); 

Note that it is VERY important not to add any other elements to the toolstrip item which contains the multi-column combo, otherwise an infinite layout loop is triggered which causes a stack overflow exception. I hope this is a solution that the users can live with. We will fix the multi-column combo to behave as expected in a future release.
Let us know if this works for you.

Regards,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
MikeB
Top achievements
Rank 1
answered on 17 Jul 2009, 02:08 PM
Victor,

Thanks for the reply and your diligence to get it to work.  I ended up creating a new property that is a concatenation of the two properties that were displayed in the old multi column combo box.  I set the value property to the same as it was and set the display property to the concatenated value.  I did have to set the drop down width large enough to handle the larger value, but it worked out pretty good and we did get rid of the old control.  So we are moving forward with our control replacement process.  As for using your example, we have two combo boxes, two buttons and a label on the toolstrip item.  They are all part of a "process" and really belong together.  In fact the item (and controls) is visible only under certain conditions.  So it would be difficult to break the controls up into separate items.  I do appreciate the effort you put into this.  It says a lot about your commitment to your product and your support.

I don't think that it is critical but there are times when a multi-column combo box on a tool strip would come in handy.

Thanks again.

Mike
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
MikeB
Top achievements
Rank 1
Answers by
Victor
Telerik team
MikeB
Top achievements
Rank 1
Share this question
or