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

Exception raised when Set User for Document Protection

1 Answer 93 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tuo
Top achievements
Rank 1
Tuo asked on 23 Aug 2012, 01:56 PM
Hi Telerik,
      An "Object reference not set to an instance of an object." exception raised ocassionally  when try to set the current user through:
          RadRichTextBox.CurrentUser = user.
          (Before set the current user, PermissionInfo and UserInfo were added correctly)
      And it was set in the handler of event RadRichTextBox.DocumentChanged.
      Could you help to check this issue? Thanks.
     (Version: 2012.2.725.1050)
==================================================================================================== 
      The exception is as follows:  
      ------------------------------------
   at Telerik.Windows.Documents.UI.HeaderPresenter.UpdateSource()
   at Telerik.Windows.Documents.UI.HeaderFooterPresenterBase.BodyRichTextBox_DocumentPresentationChanged(Object sender, EventArgs e)
   at Telerik.Windows.Controls.RadRichTextBox.OnDocumentPresentationChanged()
   at Telerik.Windows.Controls.RadRichTextBox.document_PresentationChanged(Object sender, EventArgs e)
   at Telerik.Windows.Documents.Model.RadDocument.OnPresentationChanged()
   at Telerik.Windows.Documents.Model.RadDocument.RaisePresentationAndContentChange()
   at Telerik.Windows.Documents.Model.RadDocument.InvalidatePermissions()
   at Telerik.Windows.Controls.RadRichTextBox.protectionAuthenticationProvider_AuthenticationDataChanged(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Telerik.Windows.Documents.Model.DefaultCredentialsValidator.OnAuthenticationDataChanged()
   at Telerik.Windows.Documents.Model.DefaultCredentialsValidator.richTextBox_UserInfoChanged(Object sender, EventArgs e)
   at Telerik.Windows.Controls.RadRichTextBox.OnUserInfoChanged()
   at Telerik.Windows.Controls.RadRichTextBox.CurrentUserChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadRichTextBox.set_CurrentUser(UserInfo value)


 ====================================================================================================
       The header and footer in the xaml file are as follows.
       --------------------------------------------------------------------
          <t:Section.Footers>
      <t:Footers>
        <t:Footers.Default>
          <t:Footer IsLinkedToPrevious="False" />
        </t:Footers.Default>
      </t:Footers>
    </t:Section.Footers>
    <t:Section.Headers>
      <t:Headers>
        <t:Headers.Default>
          <t:Header IsLinkedToPrevious="False">
            <t:Header.WatermarkSettings>
              <t:DocumentWatermarkSettings Type="NoWatermark" />
            </t:Header.WatermarkSettings>
          </t:Header>
        </t:Headers.Default>
      </t:Headers>
    </t:Section.Headers>

Best,
Tuo

1 Answer, 1 is accepted

Sort by
0
Nikolay Demirev
Telerik team
answered on 28 Aug 2012, 08:16 AM
Hi Tuo,

I was unable to reproduce the issue. Could you provide us with your solution and sample document for testing, so we can investigate the problem?

Looking forward to your reply.

Kind regards,
Nikolay Demirev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Tuo
Top achievements
Rank 1
Answers by
Nikolay Demirev
Telerik team
Share this question
or