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

Radwindow server side control deciding to be opened

1 Answer 34 Views
Window
This is a migrated thread and some comments may be shown as answers.
Cagdas
Top achievements
Rank 1
Cagdas asked on 13 Dec 2013, 03:38 PM
Hello My Dear Friends all telerik developer;


protected
void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
 
            SessionClear();
 
            if (Request.QueryString["portCekKartID"] != null)
            {
                string masterId = Request.QueryString["portCekKartID"].ToString();
                int id = Convert.ToInt32(masterId);
                UpdateFormControl(id);
            }
                                      //CekDurumTips = Enum
 
            if (CekDurumGetir(masterId) != CekDurumTips.EldenTahsil)
            {
                Show("Error !");
 
                //Radwindow not opened
 
                return;
 
            }
            else
            {
                //radwindow oppen
            }
 
        }



Radwindow
<telerik:RadWindow ID="radwindowPortCekGeriAl" AutoSize="false" OnClientBeforeClose="pageReflesh" Title="Cirolanmış Çekleri Geri Al"
                   runat="server" Animation="FlyIn" Behaviors="Default">
               </telerik:RadWindow>

JavaScript Radwindow open commend
function rightClickHandler(sender, args) {
 
                    var menuItemValue = args.get_item().get_value();
 
                    if (menuItemValue == "portCekGeriAl") {
                        var rowID = $("#radGridClickedRowIndex2").val();
                        openPopupPortfoyeGeriAl(sender, rowID);
 
                    }
                }


Javascript open Method
function openPopupPortfoyeGeriAl(sender, selectID) {
                    var width = parent.innerWidth - ((parent.innerWidth / 6) * 2);
                    var height = parent.innerHeight - (parent.innerHeight / 4);
                    var left = innerWidth / 9;
                    var top = 0;
                    radopen("/PortfoyeGeriAl.aspx/?portCekKartID=" + selectID, "radwindowPortCekGeriAl", width, height, left, top);
 
                }


After clicking the button you want to check on the server side radwindow opening popup
is server side error  = popup not open
is server side succes = popup open
staffed with JavaScript, but I need to check on the server side.

Not: I'm sorry my bad english :(


1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 16 Dec 2013, 03:34 PM
Hi,

You can register a script from the server that will close the RadWindow when you do not want it opened. When you want it to open after the postback, register a script that will show it. The basic logic is shown in this sticky thread: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx.

If you want to check whether the user has opened the RadWindow on the client-side - you can use the OnClientShow and OnClientClose events to change the value of a hidden field, according to the state of the RadWidow.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Window
Asked by
Cagdas
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or