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

RadDock.TitlebarTemplate button events not raised

3 Answers 94 Views
Dock
This is a migrated thread and some comments may be shown as answers.
bkj
Top achievements
Rank 1
bkj asked on 15 Sep 2008, 02:53 PM
Background: I tried to use the Commands property to add custom command buttons. However, when I did, at least one of the buttons frequently were displayed under the title bar (with the RadDock content) and not on the titlebar.

Next I added my custom buttons to the titlebar using the TitlebarTemplate. (Since I'm creating the RadDock instance programmatically and not declaratively I used TitlebarContainer property.) These buttons show up consistently on the title bar, but event handlers (Command or Click) are not raised on the server side. A postback is generated, but the event handlers are not raised.

Any ideas?

Some testing in a sandbox revealed that only ImageButton events aren't being raised. LinkButton and Button Command and Click events in the RadDock.TitlebarTemplate do get raised.

3 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 15 Sep 2008, 03:51 PM
Hello Robert,

The Custom command buttons are intended to be added in the dock's Commands collection in the way it is demonstrated in the Commands online example. The Titlebar of the RadDock is used for dragging the control and it is not intended to be used for adding Custom commands in it. Most probably the reason for the event handlers you mention not being raised when you add the custom commands in the dock's titlebar is due to drag handlers conflicting the ones you add.
The correct approach in achieving the desired scenario is the first one you have chosen. The problem you have encountered with one of the buttons falling below the title bar should be addressed in a different way. If you are not able to resolve it by yourself, please, open a support ticket and send us a sample page which demonstrates your exact scenario and reproduces the problem you observe. As soon as we can take a closer look at your setup and are able to reproduce the issue on our side we will do our best to help you.

Best regards,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
bkj
Top achievements
Rank 1
answered on 15 Sep 2008, 04:05 PM
I was following that example -- still had one of the images slipping down into the content area of the RadDock. When I have time, I'll try to send you the code. At this point, we are in a hurry (behind actually) and I'll just use LinkButtons in the TitlebarTemplate.
0
Sophy
Telerik team
answered on 16 Sep 2008, 10:50 AM
Hello,

As soon as we receive more details about the desired result and a sample test page which demonstrates the issue you observe when you add the custom commands in the Commands collection we will research the problem and do our best to help you. Once again, we do not recommend using the dock's titlebar to add controls inside it as it is used for a drag handle and the added controls may conflict with the proper functioning of the drag/drop functionality which on its side may lead to an undesired behavior.

All the best,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
bkj
Top achievements
Rank 1
Answers by
Sophy
Telerik team
bkj
Top achievements
Rank 1
Share this question
or