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

Can someone provide a code sample (zip) for a button that shows a Telerik Window?

0 Answers 25 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Top achievements
Rank 1
Damian asked on 25 Jan 2011, 05:10 AM
I have not been able to find a working, downloadable code sample in forum posts or via the Telerik sample code to illustrate how to do this.
I have a MVC web project that is using a Telerik menu in the master page, and is hosting a Telerik Tabstrip below that.
Within one of the tabs, I would like to put a button that, when clicked, shows a Telerik window.

I have the Telerik window defined on the partial view that is hosted in the tab.
If I set the window's visibility to .Visible(true), it shows fine.
But if I set it to false, and hook up the onclick event of the button to a javascript function, I always get an error.
I've tried many variations of the following:


<script type="text/javascript">
function openAlerts() 
var window = $(this).data("tWindow");
if (window != null);

I've tried replacing this with "#AlertWindow" or "AlertWindow", etc., but the window never seems to be found.
If I take out the if block that's checking the window for null, then I always get a "Microsoft JScript runtime error: 'undefined' is null or not an object"

I'm relatively new to the Telerik MVC world, so I may be missing something simple.
Anyone have a working example, ideas, etc.




Asked by
Top achievements
Rank 1
Share this question