Posted 14 June 2018, 11:17 am EST
I don’t see C1MultiSelect as a component option to add to a C1InputPanel. Is there any way to have any type of multi-select list component in a InputPanel?
Forums Home / ComponentOne / WinForms Edition
Posted by: jwhitney on 14 June 2018, 11:17 am EST
Posted 14 June 2018, 11:17 am EST
I don’t see C1MultiSelect as a component option to add to a C1InputPanel. Is there any way to have any type of multi-select list component in a InputPanel?
Posted 15 June 2018, 4:53 am EST
Hi jwhitney,
In order to use a C1MultiSelect inside a C1InputPanel you need to define a class that inherits from the InputControlHost class and then invoke the desired control’s constructor, like this:
public class C1MultiSelectForInputPanel : C1.Win.C1InputPanel.InputControlHost
{
public C1MultiSelectForInputPanel()
: base(new C1.Win.Input.C1MultiSelect())
{
} }
Now, you can access the C1MultiSelect properties from an C1MultiSelectForInputPanel object by using the Control property and then cast like this:
var cntl = (C1MultiSelect)c1MultiSelectForInputPanel1.Control;
I’ve created a simple example that demonstrates how to place C1MultiSelect inside C1InputPanel for multiple selection.
Regards,
+Manindra
Posted 15 June 2018, 6:31 am EST
Thanks Manindra.
Posted 18 June 2018, 5:25 pm EST
Thanks for the solution!