or
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
<telerik:RadCartesianChart> <telerik:RadCartesianChart.HorizontalAxis> <telerik:DateTimeContinuousAxis MaximumTicks="5" PlotMode="OnTicksPadded"/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries Name="mS"> </telerik:BarSeries> <telerik:RadCartesianChart.Behaviors> <telerik:ChartPanAndZoomBehavior/> </telerik:RadCartesianChart.Behaviors> </telerik:RadCartesianChart>public MainWindow() { InitializeComponent(); for (int i = 0; i < 100;i++ ) mS.DataPoints.Add(new Telerik.Charting.CategoricalDataPoint() { Category = System.DateTime.Today.AddDays(i), Value = 5 }); }