or
<
Grid.Resources
>
<
Style
TargetType
=
"{x:Type telerik:RadGanttView}"
>
<
Style.Resources
>
<
Style
TargetType
=
"telerik:ColumnHeaderContainer"
>
<
Setter
Property
=
"Visibility"
Value
=
"Hidden"
/>
</
Style
>
<
Style
TargetType
=
"{x:Type ToggleButton}"
>
<
Style.Resources
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"White"
/>
</
Style
>
</
Style.Resources
>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"White"
/>
</
Style
>
<
Style
TargetType
=
"telerik:SimpleTreeCellContainer"
>
<
Style.Resources
>
<
Style
TargetType
=
"{x:Type ToggleButton}"
>
<
Style.Resources
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"White"
/>
</
Style
>
</
Style.Resources
>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"White"
/>
</
Style
>
</
Style.Resources
>
<
Setter
Property
=
"Path.Fill"
Value
=
"White"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
<
Style
TargetType
=
"telerik:TreeCellContainer"
>
<
Style.Resources
>
<
Style
TargetType
=
"{x:Type ToggleButton}"
>
<
Style.Resources
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"White"
/>
</
Style
>
</
Style.Resources
>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"White"
/>
</
Style
>
</
Style.Resources
>
<
Setter
Property
=
"Path.Fill"
Value
=
"White"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
<
Style
TargetType
=
"telerik:AlternatingBorderContainer"
>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
<
Style
TargetType
=
"telerik:MajorTickContainer"
>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
<
Style
TargetType
=
"telerik:GroupTickContainer"
>
<
Setter
Property
=
"Visibility"
Value
=
"Collapsed"
/>
</
Style
>
<
Style
TargetType
=
"telerik:GanttPresenterSplitter"
>
<
Setter
Property
=
"Background"
Value
=
"Black"
/>
</
Style
>
<
Style
TargetType
=
"telerik:GanttPresenterPanel"
>
<
Style.Resources
>
<
Style
TargetType
=
"telerik:GanttPresenterSplitter"
>
<
Setter
Property
=
"Background"
Value
=
"Black"
/>
</
Style
>
</
Style.Resources
>
</
Style
>
</
Style.Resources
>
</
Style
>
</
Grid.Resources
>
<
telerik:RadGanttView
Margin
=
"0"
Name
=
"radGanttView1"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
Background
=
"LightGray"
>
<
telerik:RadGanttView.Columns
>
<
telerik:TreeColumnDefinition
ColumnWidth
=
"175"
Header
=
"Title"
MemberBinding
=
"{Binding Title}"
/>
</
telerik:RadGanttView.Columns
>
</
telerik:RadGanttView
>
</
Grid
>
Example : We have one customer booking one more room.
public
class
SortingAllowed : INotifyPropertyChanged
{
public
SortingAllowed()
{
this
.allowSorting =
false
;
}
private
bool
allowSorting_;
public
bool
allowSorting
{
get
{
return
this
.allowSorting_; }
set
{
this
.allowSorting_ = value;
OnPropertyChanged(
"allowSorting"
);
}
}
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
OnPropertyChanged(
string
propertyName)
{
if
(PropertyChanged !=
null
)
PropertyChanged(
this
,
new
PropertyChangedEventArgs(propertyName));
}
}
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
Grid.Resources
>
<
local:SortingAllowed
x:Key
=
"sortingAllowed"
/>
<
Style
TargetType
=
"telerik:GridViewRow"
x:Key
=
"DraggedRowStyle"
BasedOn
=
"{StaticResource GridViewRowStyle}"
>
<
Setter
Property
=
"telerik:DragDropManager.AllowDrag"
Value
=
"True"
/>
</
Style
>
</
Grid.Resources
>
<
StackPanel
Grid.Row
=
"0"
Orientation
=
"Horizontal"
>
<
CheckBox
IsChecked
=
"{Binding Source={StaticResource sortingAllowed}, Path=allowSorting}"
>Allow sorting</
CheckBox
>
</
StackPanel
>
<
telerik:RadGridView
Grid.Row
=
"1"
x:Name
=
"RadGridView1"
GroupRenderMode
=
"Flat"
ShowGroupPanel
=
"False"
CanUserResizeRows
=
"True"
ItemsSource
=
"{Binding Customers}"
RowStyle
=
"{StaticResource DraggedRowStyle}"
AllowDrop
=
"True"
CanUserSortColumns
=
"False"
local:RowReorderBehavior.IsEnabled
=
"{Binding Source={StaticResource sortingAllowed}, Path=allowSorting}"
telerik:ScrollingSettingsBehavior.IsEnabled
=
"True"
telerik:ScrollingSettingsBehavior.ScrollAreaPadding
=
"30"
telerik:ScrollingSettingsBehavior.ScrollStep
=
"24"
telerik:ScrollingSettingsBehavior.ScrollStepTime
=
"00:00:00.05"
>
<
chart:RadCartesianChart
Margin
=
"0"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
x:Name
=
"LineGraph"
>
<
chart:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeContinuousAxis
MajorStep
=
"4"
MajorStepUnit
=
"Week"
>
<
telerik:DateTimeContinuousAxis.LabelTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
>
<
TextBlock
HorizontalAlignment
=
"Center"
Text
=
"{Binding StringFormat='MMMM dd'}"
/>
<
TextBlock
HorizontalAlignment
=
"Center"
Text
=
"{Binding StringFormat=yyyy}"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:DateTimeContinuousAxis.LabelTemplate
>
</
telerik:DateTimeContinuousAxis
>
</
chart:RadCartesianChart.HorizontalAxis
>
<
chart:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
Title
=
"Count"
LabelInterval
=
"1"
Minimum
=
"0"
/>
</
chart:RadCartesianChart.VerticalAxis
>
<
chart:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"Y"
StripLinesVisibility
=
"Y"
>
<
telerik:CartesianChartGrid.YStripeBrushes
>
<
SolidColorBrush
Color
=
"Transparent"
/>
<
SolidColorBrush
Opacity
=
"0.15"
Color
=
"Gray"
/>
</
telerik:CartesianChartGrid.YStripeBrushes
>
</
telerik:CartesianChartGrid
>
</
chart:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowIntersectionPoints
=
"True"
/>
<
telerik:ChartPanAndZoomBehavior
PanMode
=
"Horizontal"
ZoomMode
=
"Horizontal"
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:LineSeries
CategoryBinding
=
"Day"
ClipToPlotArea
=
"False"
CombineMode
=
"Stack"
ItemsSource
=
"{Binding TasksByDay}"
Stroke
=
"{StaticResource OnTrackFillAccentBrush}"
StrokeThickness
=
"0"
Tag
=
"Area"
TrackBallInfoTemplate
=
"{StaticResource trackBallInfoTemplate}"
TrackBallTemplate
=
"{StaticResource trackBallOnTrackTemplate}"
ValueBinding
=
"OnTrack"
/>
<
telerik:LineSeries
CategoryBinding
=
"Day"
ClipToPlotArea
=
"False"
CombineMode
=
"Stack"
ItemsSource
=
"{Binding TasksByDay}"
Stroke
=
"{StaticResource OverDueFillAccentBrush}"
StrokeThickness
=
"0"
Tag
=
"Area"
TrackBallInfoTemplate
=
"{StaticResource trackBallEmptyInfoTemplate}"
TrackBallTemplate
=
"{StaticResource trackBallOverDueTemplate}"
ValueBinding
=
"OverDue"
/>
</
chart:RadCartesianChart
>
public
class
TasksDueOnDay
{
public
DateTime Day {
get
;
set
; }
public
int
OnTrack {
get
;
set
; }
public
int
OverDue {
get
;
set
; }
public
override
string
ToString()
{
return
"TasksDueOnDay.ToString()"
;
}
}
Hello
We generate GridViewDataColumn columns in run time
We give cell template and cell edit template
When the cell goes out from edit mode it throws
Null reference exception in TryConvertValueFromEditor at GriveViewCell Class
Dll version 2013.2.611.45
If I don’t give cell edit template this not happened.
Any ideas why this happens?
Best Regards
Ehud