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

[Solved] Column resizing issue

3 Answers 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
K V
Top achievements
Rank 1
K V asked on 26 Oct 2009, 08:30 PM
Hello,
I use a RadGrid control with the option "AllowColumnResize" set to true.
The Grid is in the update panel with the timer attached. The timer updates gridevery 7 seconds.
The problem I have is that if I'm resizing the column and timer event occurs then IE7 show the error in this function:

Telerik.Web.UI.GridColumnResizer.prototype={dispose:function(){try{this._destroy()
}catch(a){}if(this._onMouseUpDelegate){$telerik.removeExternalHandler(document,"mouseup",this._onMouseUpDelegate)
}if(this._onMouseMoveDelegate){$removeHandler(this._column._owner._owner.get_element(),"mousemove",this._onMouseMoveDelegate)
} .....

Actually the $removeHandler throws the error because the object this._column._owner._owner.get_element() has no event "mousemove" at all.

Do you have working example with RadGrid, timer to update it AND column resizing?
Thank you.

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 30 Oct 2009, 07:23 AM
Hello K V,

Unfortunately  this behavior occurs due to the fact that when timer updates RadGrid it triggers dispose to destroy it client object including events.
In this case you should manually handle this scenario and prevent timer to update RadGrid while resizing.

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
K V
Top achievements
Rank 1
answered on 30 Oct 2009, 06:05 PM
Nikolay,
Thank you for the answer.
Do you know what event can I use to stop timer when resizing is performing?
I've tried use OnColumnResizing but it seems that while user doesn't release the mouse button (i.e. new size isn't set) this event doesn't fire.

Konstantin
0
Nikolay Rusev
Telerik team
answered on 05 Nov 2009, 07:49 AM
Hello K V,

You can disable timer tick temporary if the user is resizing the column at the same time. For example - attach handler to RadGrid ClientEvents.OnColumnResizing find client instance of your Timer and set enabled to false:
1.<script type="text/javascript">
2.        function resizing(sender, args)
3.        {           
4.            $find("Timer1").set_enabled(false);
5.        }
6.</script>


Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
K V
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
K V
Top achievements
Rank 1
Share this question
or