This is a migrated thread and some comments may be shown as answers.

RadRichTextBox crashs with ArgumentNullException

2 Answers 44 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 24 Jan 2013, 11:07 AM

I try to use a RadRichTextBox in a grid. Everytime, if i select the element in Code, i get an ArgumentNullException.

Any Ideas?

Regards Thomas

<Grid x:Name="LayoutRoot" Background="White">
        
       <Grid.RowDefinitions>
           <RowDefinition/>
           <RowDefinition Height="Auto"/>
       </Grid.RowDefinitions>
 
       <telerik:RadGridView  x:Name="AdressenGrid"
                             ItemsSource ="{Binding Screen.Q_AdresseNachMatchCode, Mode=TwoWay}"
                             SelectedItem="{Binding Screen.Q_AdresseNachMatchCode.SelectedItem, Mode=TwoWay}"
                             AutoGenerateColumns="False"
                             RowDetailsVisibilityMode="Collapsed"
                             Grid.Row="0" >
 
           <telerik:RadGridView.Columns>
               <telerik:GridViewToggleRowDetailsColumn />
               <telerik:GridViewDataColumn Header="Nummer"    DataMemberBinding="{Binding Nummer}" Width="200" />
               <telerik:GridViewDataColumn Header="Matchcode" DataMemberBinding="{Binding Matchcode}" Width="200"  />
               <telerik:GridViewDataColumn Header="Strasse"   DataMemberBinding="{Binding Strasse}"   Width="200"/>
               <telerik:GridViewDataColumn Header="Aktiv"     DataMemberBinding="{Binding AdresseAktiv}" Width="200" />
               <telerik:GridViewDataColumn Header="Anschrift">
 
                   <telerik:GridViewDataColumn.CellTemplate>
                       <DataTemplate>
                           <telerik:RadRichTextBox
                               AcceptsTab="False" IsSelectionEnabled="True"
                               x:Name="roAnschrift"
                               telerik:HtmlDataProvider.Source="{Binding Anschrift, Mode=TwoWay}" />
                       </DataTemplate>
                   </telerik:GridViewDataColumn.CellTemplate>
 
                   <telerik:GridViewDataColumn.CellEditTemplate>
                       <DataTemplate>
                           <telerik:RadRichTextBox
                               x:Name="rwAnschrift"
                               telerik:HtmlDataProvider.Source="{Binding Anschrift, Mode=TwoWay}"
                               AcceptsTab="False"/>
 
                       </DataTemplate>
 
                   </telerik:GridViewDataColumn.CellEditTemplate>
 
               </telerik:GridViewDataColumn>
                
           </telerik:RadGridView.Columns>

2 Answers, 1 is accepted

Sort by
0
Thomas
Top achievements
Rank 1
answered on 24 Jan 2013, 11:10 AM
Additional Info:

This error occurs also if i create a new usercontrol and try to implemnt a RadRichTextBox with the wizzard.

I´m using Vs2012 in german
0
Vasil
Telerik team
answered on 28 Jan 2013, 04:44 PM
Hello Thomas,

Unfortunately, we were not able to reproduce the problems described. Could you please verify that all needed references have been added to your project?

We are not sure that we understand exactly what you mean with "
select the element in Code", so we would appreciate if you could send us sample codes for this. It would be great if you could isolate the problem in a sample project and send it back to us using a support ticket.

Regarding the wizard issue, could you please share addition information like inner exception and stack trace? Does the exception occur only when creating a new user control оr each time? Exact steps to reproduce will be very helpful.

Looking forward to your reply.

Kind regards,
Vasil
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Thomas
Top achievements
Rank 1
Answers by
Thomas
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or