This question is locked. New answers and comments are not allowed.
Hello I am having an issue with the radgridview. The error does not occur with the debugger attached.
But in either IE or Chrome It crashes silverlight and the browser.
No error is caught in the unhandled exception event either.
The grid is generated in code at runtime, in a custom control.
I am not using the grid normally (horizontally). I am using it as a UI to allow the user to build a filter, with which I generate a sql statement , and fill a result grid.
Each row of the last column is for the filter value. it can be text box, combobox, checkbox or a datetime picker in edit mode.
Each row is a new filter.
All the controls are successfully created, all the combobox itemsources (a property on the filter object) are loaded.
The control rests inside an expander, as soon as that expander is opened and the grid being displayed it blows up.
I am 95% sure that the issue rests with the combobox rows. But I could be wrong. There is logging in the ControlType Converters
and the Template Selectors. when the debugger is not attached it never gets to that level.
When I turn off the preloading of the grid's comboboxes. I can load the grid, display it and I can click on any row. that is not a combobox till I click on the combobox.
It goes down, I select something all good till I click on another row then it blows up , no error no dump nothing.
I have so much logging that I have more logging code that actual code but can still not find the error/problem. With the debugger attached it logs. Every event I could think of each step of the way.
I would appreciate any help you could give. Ideas. If you need anything else I can post snippets of w/e.
Screenshot of the control working
With Debugger Log
Without Debugger Log
Control XAML
Platform
Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
Telerik Silverlight VSExtensions 2014.1.318.0
Telerik UI for Silverlight VSExtensions
But in either IE or Chrome It crashes silverlight and the browser.
No error is caught in the unhandled exception event either.
The grid is generated in code at runtime, in a custom control.
I am not using the grid normally (horizontally). I am using it as a UI to allow the user to build a filter, with which I generate a sql statement , and fill a result grid.
Each row of the last column is for the filter value. it can be text box, combobox, checkbox or a datetime picker in edit mode.
Each row is a new filter.
All the controls are successfully created, all the combobox itemsources (a property on the filter object) are loaded.
The control rests inside an expander, as soon as that expander is opened and the grid being displayed it blows up.
I am 95% sure that the issue rests with the combobox rows. But I could be wrong. There is logging in the ControlType Converters
and the Template Selectors. when the debugger is not attached it never gets to that level.
When I turn off the preloading of the grid's comboboxes. I can load the grid, display it and I can click on any row. that is not a combobox till I click on the combobox.
It goes down, I select something all good till I click on another row then it blows up , no error no dump nothing.
I have so much logging that I have more logging code that actual code but can still not find the error/problem. With the debugger attached it logs. Every event I could think of each step of the way.
I would appreciate any help you could give. Ideas. If you need anything else I can post snippets of w/e.
Screenshot of the control working
With Debugger Log
Without Debugger Log
Control XAML
<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="OSMRP1.GridEngine.GridFilter" xmlns:GridEngine="clr-namespace:OSMRP1.GridEngine" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:converters="clr-namespace:Telerik.Windows.Documents.Converters;assembly=Telerik.Windows.Controls.FixedDocumentViewers" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <UserControl.Resources> <!-- Control Converter --> <GridEngine:FilterControlTypeConverter x:Key="valuecontrolconverter" /> <GridEngine:FilterValueConverter x:Key="valueconverter" /> <converters:BoolToVisibilityConverter x:Key="boolvisibleconverter" /> <DataTemplate x:Key="ComboItemTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="50" /> <ColumnDefinition Width="100" /> </Grid.ColumnDefinitions> <Border Background="#77AAAAAA"> <TextBlock Text="{Binding ID}" /> </Border> <Border Grid.Column="1" Margin="4,0,0,0" Background="White"> <TextBlock Text="{Binding Name}" /> </Border> </Grid> </DataTemplate> <DataTemplate x:Key="captiondisplay"> <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch"> <TextBlock Text="*" Visibility="{Binding is_required, Converter={StaticResource boolvisibleconverter}}" FontWeight="Bold" Foreground="Green" /> <TextBlock Text="{Binding caption}" /> </StackPanel> </DataTemplate> <!-- Edit Templates --> <DataTemplate x:Key="valueEditTextBox"> <TextBox Text="{Binding value, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}" Background="white" /> </DataTemplate> <DataTemplate x:Key="valueEditComboBox"> <ComboBox DisplayMemberPath="Name" SelectedValuePath="ID" ItemsSource="{Binding ItemSource, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding value, Mode=TwoWay, Converter={StaticResource valueconverter}, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding HasAllTagValues}" Loaded="ComboBox_Loaded" BindingValidationError="ComboBox_BindingValidationError" /> </DataTemplate> <DataTemplate x:Key="valueEditCheckBox"> <CheckBox IsChecked ="{Binding value, Mode=TwoWay, Converter={StaticResource valueconverter}, UpdateSourceTrigger=PropertyChanged}" Background="white" HorizontalAlignment="Center" /> </DataTemplate> <DataTemplate x:Key="valueEditDateTimePicker"> <telerik:RadDateTimePicker SelectedValue="{Binding value, Mode=TwoWay, Converter={StaticResource valueconverter}, UpdateSourceTrigger=PropertyChanged}" Background="white" /> </DataTemplate> <!-- Display Templates --> <DataTemplate x:Key="valueDisplayTextBox"> <TextBlock Text="{Binding ValueText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> </DataTemplate> <DataTemplate x:Key="valueDisplayComboBox"> <TextBlock Text="{Binding ValueText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> </DataTemplate> <DataTemplate x:Key="valueDisplayCheckBox"> <CheckBox IsChecked ="{Binding value, Mode=TwoWay, Converter={StaticResource valueconverter}, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" /> </DataTemplate> <DataTemplate x:Key="valueDisplayDateTimePicker"> <telerik:RadDateTimePicker InputMode="DatePicker" SelectedValue="{Binding value, Mode=TwoWay, Converter={StaticResource valueconverter}, UpdateSourceTrigger=PropertyChanged}" Background="white" /> </DataTemplate> <!-- Display Mode Rules--> <GridEngine:FilterDataTemplateSelector x:Key="DisplayControlRules" ConditionConverter="{StaticResource valuecontrolconverter}"> <GridEngine:FilterDataTemplateSelector.Rules> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueDisplayTextBox}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>0</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueDisplayComboBox}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>1</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueDisplayCheckBox}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>2</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueDisplayDateTimePicker}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>3</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> </GridEngine:FilterDataTemplateSelector.Rules> </GridEngine:FilterDataTemplateSelector> <!-- Exit Mode Rules--> <GridEngine:FilterDataTemplateSelector x:Key="EditControlRules" ConditionConverter="{StaticResource valuecontrolconverter}"> <GridEngine:FilterDataTemplateSelector.Rules> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueEditTextBox}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>0</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueEditComboBox}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>1</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueEditCheckBox}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>2</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> <GridEngine:FilterDataTemplateRule DataTemplate="{StaticResource valueEditDateTimePicker}"> <GridEngine:FilterDataTemplateRule.Value> <sys:Int32>3</sys:Int32> </GridEngine:FilterDataTemplateRule.Value> </GridEngine:FilterDataTemplateRule> </GridEngine:FilterDataTemplateSelector.Rules> </GridEngine:FilterDataTemplateSelector> </UserControl.Resources> <Grid x:Name="LayoutRoot" > <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="30"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.Background> <LinearGradientBrush EndPoint="0.988,0.988" StartPoint="0.019,0.025"> <GradientStop Color="Black" Offset="0.391"/> <GradientStop Color="#FFD5C4C4" Offset="1"/> </LinearGradientBrush> </Grid.Background> <telerik:RadBusyIndicator Grid.Row="1" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Name="busyIndicator" IsBusy="False" IsIndeterminate="True"> <telerik:RadGridView x:Name="rgvFilter" Grid.Row="1" CanUserReorderColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" CanUserFreezeColumns="False" CanUserSortColumns="False" CanUserSortGroups="False" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" ShowColumnHeaders="False" IsFilteringAllowed="False" ShowGroupPanel="False" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem ="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RowIndicatorVisibility="Collapsed" ScrollViewer.VerticalScrollBarVisibility="Auto" VerticalContentAlignment="Top" RowStyle="{StaticResource PhoenixGridViewRowStyle}" DataLoaded="rgvFilter_DataLoaded" DataContextChanged="rgvFilter_DataContextChanged" RowLoaded="rgvFilter_RowLoaded" BindingValidationError="rgvFilter_BindingValidationError" Loaded="rgvFilter_Loaded" BeginningEdit="rgvFilter_BeginningEdit" DataError="rgvFilter_DataError" > </telerik:RadGridView> </telerik:RadBusyIndicator> </Grid>
</UserControl>
Platform
Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
Telerik Silverlight VSExtensions 2014.1.318.0
Telerik UI for Silverlight VSExtensions