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

Multiselect RadCombobox, Selected\Checked items Display Issue

4 Answers 197 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Abhishek Chauhan
Top achievements
Rank 1
Abhishek Chauhan asked on 04 Nov 2009, 07:42 AM
Hi,

I am facing some issues in displaying the combobox selected item in the combobox(treeview inside combobox) once its collapses
I have a multiselect combobox and when the user checks one or more items i need to display them as csv but for that I had to set the combobox IsEditable property to "True" and when i do so the items are diplayed but the entire screen except the combobox freezes.

Combobox-

<

 

telerikInput:RadComboBox FontFamily="Verdana" IsEditable="False" FontSize="10" x:Name="radcmbGroupMitigationsBy" HorizontalAlignment="Left" Width="135" Margin="40,45,0,0" VerticalAlignment="Top">

 

 

 

<telerikInput:RadComboBox Height="25" Width="0"/>

 

 

 

<telerikNavigation:RadTreeView x:Name="radtvGroupMitigationsBy" SelectionMode="Multiple" Checked="radtvGroupMitigationsBy_Checked" Unchecked="radtvGroupMitigationsBy_Unchecked">

 

 

 

</telerikNavigation:RadTreeView>

 

 

 

</telerikInput:RadComboBox>

Checked events-

 

 

private void radtvGroupMitigationsBy_Checked(object sender, Telerik.Windows.RadRoutedEventArgs e)

 

{

 

try

 

 

 

 

{

 

this

 

.PerformGrouping(true, e.OriginalSource.ToString());

 

 

 

 

radcmbGroupMitigationsBy.IsEditable =

true;

 

 

if (radcmbGroupMitigationsBy.Text != null)

 

{

 

 

 

 

 

 

radcmbGroupMitigationsBy.Text +=

"," + " " + Convert.ToString(e.OriginalSource);

 

 

 

 

 

 

 

}

 

 

else

 

 

 

 

{

radcmbGroupMitigationsBy.Text =

Convert.ToString(e.OriginalSource);

 

}

}

 

catch (Exception ex)

 

{

 

MessageBox.Show(ex.Message + ex.StackTrace);

 

}

}

"PerformGrouping" is simply a function that I am using for performing custom grouping.
Please suggest how to display the selected\checked items from a radcombobox (the one with the treeview inside).
As I have a limited knowledge of the Radcombobox behaviour I may be doing something wrong here so please feel free to point out the errors and do suggest some solution.

Thanks in Advance,
Abhishek Chauhan

4 Answers, 1 is accepted

Sort by
0
Abhishek Chauhan
Top achievements
Rank 1
answered on 06 Nov 2009, 10:04 AM
Someone please pick this thread and help me out.

Thanks in Advance,
Abhishek Chauhan
0
Valeri Hristov
Telerik team
answered on 06 Nov 2009, 11:53 AM
Hi,

Generally, for scenarios where a TreeView should be placed in the RadComboBox dropdown, I would not recommend placing a TreeView directly inside RadComboBox. Here is the recommended way for doing this:
http://blogs.telerik.com/valerihristov/posts/09-08-27/treeview_in_combobox_take_3_silverlight_3_wpf_and_radcontrols.aspx

You could also try using RadDropDownButton instead of RadComboBox - I suppose that it would be easier this way.

Kind regards,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Abhishek Chauhan
Top achievements
Rank 1
answered on 06 Nov 2009, 03:32 PM
Hi Valeri,

Can you plesae send me a sample code for the same.....that will be very helpful.

Thanks,
Abhishek Chauhan
0
Valeri Hristov
Telerik team
answered on 06 Nov 2009, 04:09 PM
Hello Abhishek,

There is a nice example in our online demos, demonstrating how to put RadTreeView inside RadDropDownButton:
http://demos.telerik.com/silverlight/#Buttons/DropDownButton

Best wishes,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Abhishek Chauhan
Top achievements
Rank 1
Answers by
Abhishek Chauhan
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or