OnColumnHeaderResize method is giving exception when resizing columns

2 posts, 0 answers
  1. George
    George avatar
    1 posts
    Member since:
    Jul 2016

    Posted 21 Jun 2017 Link to this post

    We have a problem when we resize columns in GridViewHeaderCell. . I paste the stack trace below. I see that IsValidResizableCell method is throwing exception under OnColumnHeaderResize method. Is there a way to handle this error?

    We are using telerik version 2016 (Q2 version)

    SilverlightError:  Unhandled Error in Silverlight Application 
    Category: ManagedRuntimeError       
    Message: System.NullReferenceException: Object reference not set to an instance of an object. 
       at Telerik.Windows.Controls.GridView.GridViewHeaderCell.IsValidResizableCell(Object gripper) 
       at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnColumnHeaderResize(Object sender, DragDeltaEventArgs e) 
       at System.Windows.Controls.Primitives.Thumb.OnMouseMove(MouseEventArgs e) 
       at System.Windows.Controls.Control.OnMouseMove(Control ctrl, EventArgs e) 
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

    We started getting this error after modifying the control template for GridViewHeaderRow. We had a business requirement to apply different border colour and different border thickness to Grid Headers. i am attaching the file for your reference.

    Refer to style 'GridViewHeaderCell_RightAlignWithPrintMarginIndicator'  and 'GridViewHeaderCell_LeftAlignWithPrintMarginIndicator' . The changes done to control template is replace the border defined under PART_HeaderCellGrid.

    Rename the attached file (remove the Jpeg extension)




  2. Dilyan Traykov
    Dilyan Traykov avatar
    1136 posts

    Posted 26 Jun 2017 Link to this post

    Hello George,

    I've tried to reproduce the issue you've described based on the provided information, but was, unfortunately, unable to do so. I'm attaching a sample project where I've extracted only the necessary styles and templates, however, resizing the columns does not result in the aforementioned exception.

    Could you please have a look at it and let me know whether I'm missing something of importance? Additionally, it would really be of help if you could reproduce the issue and let me know what modifications I should make in order to replicate it at my end as well.

    Thank you in advance for your cooperation on the matter.

    Dilyan Traykov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top