<!-- Tabs -->
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
Margin
=
"0,-3,0,0"
BorderThickness
=
"1"
>
<
telerik:RadPaneGroup
TabStripPlacement
=
"Top"
ItemsSource
=
"{Binding Tabs}"
Background
=
"#FFF0F0F0"
BorderThickness
=
"1"
BorderBrush
=
"#FF868686"
>
<
telerik:RadPaneGroup.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadPane"
>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
<
Setter
Property
=
"CanUserClose"
Value
=
"False"
/>
<
Setter
Property
=
"CanFloat"
Value
=
"True"
/>
<
Setter
Property
=
"CanUserPin"
Value
=
"False"
/>
<
Setter
Property
=
"ContextMenuTemplate"
Value
=
"{x:Null}"
/>
</
Style
>
</
telerik:RadPaneGroup.ItemContainerStyle
>
<
telerik:RadPaneGroup.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
VerticalAlignment
=
"Center"
>
<
StackPanel.Resources
>
<
Style
TargetType
=
"{x:Type Ellipse}"
>
<
Setter
Property
=
"Width"
Value
=
"3"
/>
<
Setter
Property
=
"Height"
Value
=
"3"
/>
<
Setter
Property
=
"Fill"
Value
=
"Red"
/>
<
Setter
Property
=
"Margin"
Value
=
"3,0,3,0"
/>
</
Style
>
</
StackPanel.Resources
>
<
TextBlock
Text
=
"{Binding Title}"
/>
<
Ellipse
Visibility
=
"{Binding IsDirty, Converter={StaticResource BooleanToVisibilityConverter}}"
/>
<
Button
Command
=
"{Binding CloseCommand}"
Width
=
"12"
Height
=
"12"
Margin
=
"4,0,0,0"
ToolTipService.ToolTip
=
"Close Tab"
>
<
Button.Content
>
<
Path
Data
=
"M0,0 L6,6 M6, 0 L0,6"
Stroke
=
"Black"
StrokeThickness
=
"0.5"
/>
</
Button.Content
>
</
Button
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadPaneGroup.ItemTemplate
>
<
telerik:RadPaneGroup.ContentTemplate
>
<
DataTemplate
>
<
Views:ClientDetails
DataContext
=
"{Binding}"
IsDirty
=
"{Binding IsDirty,Mode=TwoWay}"
/>
</
DataTemplate
>
</
telerik:RadPaneGroup.ContentTemplate
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
Hi,
I cannot figure out the syntax to bind an ADO.NET DataTable to a Rad Combobox. Can you please help me by posting some source code on how to accomplish the following task:
I have a DataTable fo countries that has an id column and a name column. I want to show the country name in the combo box but when an item is selected in the combo box, I want to return the id. This is a very common task in asp.net and win forms but I cannot figure out how to do this task using the rad combo box.
How would I accomplish something like this using the rad combo box?
DataTable dt = GetCountries();
This.cboCountries.DataText = “Country”;
This.cboCountries.DataValue = “id”;
This.cboCountries.DataSource = dt;
This.cboCountries.DataBind();
…
// get the selected id in the combo box
Int id = this.cboCountries.SelectedValue;
Can you please post the correct syntax to accomplish this task using the rad combo box.
Thanks for the help!
Bill