or
datamodel.AddedRow += delegate
{
Grid.CommitEdit();
Grid.CancelEdit();
Grid.UnselectAll();
if(!Grid.IsKeyboardFocused)
Grid.Focus();
Grid.CurrentItem = datamodel.Selected[0];
Grid.SetIsCurrent( datamodel.Selected[0], true );
Grid.BeginEdit();
};
<
Input:RadDateTimePicker
x:Name
=
"dateTimePicker"
Width
=
"150"
Margin
=
"3,0,0,0"
DateTimeWatermarkContent
=
"DateTime"
SelectedValue
=
"{Binding StartDateTime, Mode=TwoWay}"
VerticalAlignment
=
"Center"
SelectionChanged
=
"dateTimePicker_SelectionChanged"
/>
private
DateTime _startDateTime = DateTime.Now;
public
DateTime StartDateTime
{
get
{
return
_startDateTime ;
}
set
{
if
(_startDateTime != value)
{
_startDateTime = value;
OnPropertyChanged(
"StartDateTime"
);
}
}
}
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
OnPropertyChanged(
string
propertyName)
{
if
(
this
.PropertyChanged !=
null
)
{
this
.PropertyChanged(
this
,
new
PropertyChangedEventArgs(propertyName));
}
}
A first chance exception of type 'System.ArgumentException' occurred in Telerik.Windows.Data.dll
<
UserControl x:Class="GridTeams"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" >
<UserControl.Resources>
</UserControl.Resources>
<Grid>
<telerik:RadGridView ItemsSource="{Binding Source={StaticResource DataTeams}}"
Margin="10">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=TN}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
</
UserControl>
<
Grid
>
<
telerik:RadDocking
Background
=
"Transparent"
d:IsHidden
=
"True"
>
<
telerik:RadSplitContainer
telerik:DockingPanel.InitialSize
=
"200,150"
MaxWidth
=
"600"
Name
=
"leftContainer"
InitialPosition
=
"DockedLeft"
>
<
telerik:RadPaneGroup
DropDownDisplayMode
=
"Collapsed"
>
<
telerik:RadPane
x:Name
=
"featurePane"
Header
=
"Featrues"
>
<
Controls:RadTreeView
SelectionMode
=
"Extended"
IsLineEnabled
=
"False"
ItemsOptionListType
=
"CheckList"
IsOptionElementsEnabled
=
"True"
IsRootLinesEnabled
=
"True"
VerticalAlignment
=
"Stretch"
Margin
=
"0"
x:Name
=
"featureTree"
IsTriStateMode
=
"True"
>
</
Controls:RadTreeView
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
<
telerik:RadDocking.DocumentHost
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"100"
/>
<
RowDefinition
Height
=
"310*"
/>
</
Grid.RowDefinitions
>
<
Controls1:RadChart
x:Name
=
"radPipe"
Grid.Row
=
"0"
UseDefaultLayout
=
"False"
>
<
Charting:ChartArea
x:Name
=
"pipeArea"
>
</
Charting:ChartArea
>
</
Controls1:RadChart
>
<
Controls1:RadChart
x:Name
=
"radStatistics"
Grid.Row
=
"1"
UseDefaultLayout
=
"False"
BorderBrush
=
"Transparent"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"165*"
/>
<
ColumnDefinition
Width
=
"120"
/>
</
Grid.ColumnDefinitions
>
<
Charting:ChartLegend
Grid.Column
=
"1"
Name
=
"pieLegend"
/>
<
Charting:ChartArea
x:Name
=
"pieArea"
Grid.Column
=
"0"
LegendName
=
"pieLegend"
/>
</
Grid
>
</
Controls1:RadChart
>
</
Grid
>
</
telerik:RadDocking.DocumentHost
>
</
telerik:RadDocking
>
<
Button
Content
=
"Button"
Height
=
"27"
HorizontalAlignment
=
"Left"
Margin
=
"62,105,0,0"
Name
=
"button1"
VerticalAlignment
=
"Top"
Width
=
"96"
Click
=
"button1_Click"
/>
</
Grid
>
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
this
.InitializeComponent();
}
private
static
DataSeries GetPieData()
{
DataSeries series =
new
DataSeries();
for
(
int
i=0;i<5;i++)
{
DataPoint dataPoint =
new
DataPoint(
"aa"
+i, i);
dataPoint.LegendLabel=
"aa"
+i;
series.Add(dataPoint);
}
return
series;
}
private
void
ConfigurePie()
{
DataSeries doughnutSeries = GetPieData();
doughnutSeries.LegendLabel =
"Doughnut Series"
;
doughnutSeries.Definition =
new
DoughnutSeriesDefinition();
doughnutSeries.Definition.InteractivitySettings.HoverScope = InteractivityScope.Item;
doughnutSeries.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Item;
doughnutSeries.Definition.InteractivitySettings.SelectionMode = ChartSelectionMode.Single;
((DoughnutSeriesDefinition)doughnutSeries.Definition).LabelSettings.LabelOffset = 0.8d;
doughnutSeries.Definition.ItemLabelFormat =
"#Y"
;
pieArea.DataSeries.Clear();
pieArea.DataSeries.Add(doughnutSeries);
pieArea.SmartLabelsEnabled =
true
;
pieLegend.Header =
" "
;
}
private
void
button1_Click(
object
sender, RoutedEventArgs e)
{
ConfigurePie();
}
}