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

How to get values programmatically from RadWindow?

5 Answers 286 Views
Window
This is a migrated thread and some comments may be shown as answers.
mohsinjk jk
Top achievements
Rank 1
mohsinjk jk asked on 11 Aug 2010, 11:03 AM
Hi,

I am working RadWindow control. I want to get values from RadWindow and use these in parent window (web page) using C#.Net (code behind).

I have already saw/read some demo but i am not getting because most them are not based on code behind those examples are using aspx.

for example: http://demos.telerik.com/aspnet-ajax/window/examples/clientsideevents/defaultcs.aspx?product=window

I want these type of code in code behind file like C#.Net.

Please guide me.

Thanks 



5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 11 Aug 2010, 11:38 AM
Hello mohsinjk jk,

RadWindow can display a content page, different from the parent one. In such case, because the parent page and the content are 2 separate pages, the communication between them is done on the client - just like with a standard IFRAME.
Since Q3 2009, RadWindow supports content template. In such scenario, the content is on the main page and you can access it directly from codebehind. See this demo and this help topic for more information on the subject.


Best wishes,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mohsinjk jk
Top achievements
Rank 1
answered on 11 Aug 2010, 11:57 AM
can I catch the Radwindow close event. and what is this onclientclose? How i can know radwindow is closed now using code behind code.
0
Princy
Top achievements
Rank 2
answered on 11 Aug 2010, 12:23 PM
Hi,


The OnClientClose is the client event which fires when the window closes. A simple method to check whether the window is closed or not, is by placing HiddenField on page and setting the value from OnClientClose event. Now access the HiddenField value from code behind to check whether window clossed.


Thanks,
Princy.
0
mohsinjk jk
Top achievements
Rank 1
answered on 11 Aug 2010, 12:28 PM
I am little bit confuse about its functionality. Could you send me any example code. It would be great. Thanks
0
Princy
Top achievements
Rank 2
answered on 16 Aug 2012, 08:56 AM
Hi,

Try setting a hiddenfield as follows to check whether a Window is open.

Javascript:
<script type="text/javascript">
function OnClientClose()
  {
   document.getElementById("HiddenField1").value = "closed";
  }
function OnClientShow()
  {
    document.getElementById("HiddenField1").value = "shown";
  }
</script>

C#:
string windowStatus = HiddenField4.Value;

Thanks,
Princy.
Tags
Window
Asked by
mohsinjk jk
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
mohsinjk jk
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or