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

Custom RadWindow Behaviors

2 Answers 161 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shaun Peet
Top achievements
Rank 2
Shaun Peet asked on 20 Jan 2009, 08:30 PM
Is it possible to create custom behaviors for a RadWindow?  Something where you could specify an icon and / or text for the "button", and then assign a client onclick command for the custom behavior which calls a script within the IFRAME.

Just like how you guys already have for the Reload behavior, the custom behaviors should probably only work if the url of the window is from the same application.

I have a couple scenarios off the top of my head where this would be very useful:
1) Printing the content (or executing a custom print command) of the page in the window - since the default browser windows are gone for the radwindow it would be helpful to be able to add a very simple "Print" custom command back into the title area.
2) Custom "pop-up" data forms which have a "Save" or "Cancel" or "Insert" or "Update" command.

For #2, right now I usually set the titlebar to hidden since it is more or less a waste of space.  I'd like to use it though since it does add some nice polish to the window, and if custom commands were an option I could do so.

This would have the added benefit of keeping the custom commands in view if the content of the IFRAME scrolls beyond the height of the RadWindow.

You guys could also use custom commands for the RadEditor's dialog windows - putting the "Insert" button in the title area which would make alot more sense.

I could classify this as an advanced feature and wouldn't need you guys to make it "easy" to pull off.  It would be nice though if it were possible.  Please forgive me if it already is possible and I've missed it, and of course let me know where to find it.  Thanks,

Shaun.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Jan 2009, 07:46 AM
Hello Shaun,

Check out the following KB article which explains on how to implement a custom button in your window titlebar. You should probably find it helpful.
Adding a Custom Button to RadWindow Titlebar

Princy.
0
Accepted
Georgi Tunev
Telerik team
answered on 22 Jan 2009, 12:53 PM
Hi guys,

We've just updated the KB that Princy mention and improved the code in it. Shaun, currently the only way to do this is to use custom buttons and code as shown in the KB, but we will consider improving the logic of the control, so the implementation can be easier and to be possible to set such new behaviors with the Behaviors property.


Kind regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Shaun Peet
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or