3 Answers, 1 is accepted
0
Hello,
The Silverlight equivalent of dropdown list is called RadComboBox.
Greetings,
Pavel Pavlov
the Telerik team
The Silverlight equivalent of dropdown list is called RadComboBox.
Greetings,
Pavel Pavlov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Deepak
Top achievements
Rank 1
answered on 31 Jan 2013, 07:42 AM
Hi Pavel,
I have a Raddropdown button in my xaml file, and i need to display the selected item in the code behind(.cs) through message box in the same button click event, How to do that, Plz help...
I have a Raddropdown button in my xaml file, and i need to display the selected item in the code behind(.cs) through message box in the same button click event, How to do that, Plz help...
<
telerik:RadDropDownButton
AutoOpenDelay
=
"0:0:0.0"
Name
=
"rad1"
Content
=
"Choose an Item"
Grid.Row
=
"0"
Width
=
"150"
Height
=
"20"
Click
=
"rad1_Click"
>
<
telerik:RadDropDownButton.DropDownContent
>
<
ListBox
>
<
ListBoxItem
Content
=
"Item 1"
/>
<
ListBoxItem
Content
=
"Item 2"
/>
<
ListBoxItem
Content
=
"Item 3"
/>
</
ListBox
>
</
telerik:RadDropDownButton.DropDownContent
>
</
telerik:RadDropDownButton
>
0
Accepted
Hi Deepak,
When you show a MessageBox control the thread that your application is running freezes. After you click the OK button the thread throws the event again and this is why it goes in infinite loop. In order to overcome this you have to wait the event to end. This can be done by using a Dispatcher:
Please try this snippet out and let me know if you have any other questions.
Regards,
Pavel R. Pavlov
the Telerik team
When you show a MessageBox control the thread that your application is running freezes. After you click the OK button the thread throws the event again and this is why it goes in infinite loop. In order to overcome this you have to wait the event to end. This can be done by using a Dispatcher:
private
void
Click(
object
sender, RoutedEventArgs e)
{
Dispatcher.BeginInvoke(
new
Action(() => { MessageBox.Show(
string
.Format(
"{0}"
,
this
.List.SelectedItem.ToString())); }));
}
Please try this snippet out and let me know if you have any other questions.
Regards,
Pavel R. Pavlov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.