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

OnColumnHeaderResize method is giving exception when resizing columns

1 Answer 6 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 21 Jun 2017, 10:12 AM

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)

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 26 Jun 2017, 08:50 AM
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.

Regards,
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.
Tags
TreeListView
Asked by
George
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or