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

How do i call Radwindo js from code behind?

4 Answers 100 Views
Window
This is a migrated thread and some comments may be shown as answers.
ALEX
Top achievements
Rank 1
ALEX asked on 14 Feb 2011, 11:16 AM
Hi Team,

         I'm not family with Radcontrol. I'm trying and using it. Currently i have face with this problem. We can be run js function from codebehind. But when i call rad window function, it cannot be fire.

Here is my sample code, i refer from rad window sample code.
JS
function openWin(url,winid)
        {
            var _contparameter='';
            switch(winid)
            {
                case "_radWinItem":
                    _contparameter=document.getElementById('<%=this._itms.ClientID%>').value;
                    break;
                case "_radWinCustomer":
                    _contparameter='';
                    break;
                default:   
            }
            var oWnd = radopen(url+_contparameter, winid);
       }

CS
protected void TextBox1_TextChanged(object sender, EventArgs e)
    {
        ClientScript.RegisterStartupScript(GetType(), "Javascript", "javascript: openWin('item.aspx','_radWin'); ", true);
    }


Kindly, pls help to me. i need urgent.
One more thing, when i call above function 1st time i saw js error in IE. And then 2nd i don't see js error. What wrong it?

Best Regards,

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Feb 2011, 12:43 PM
Hello Alex,

Refer the following thread which discussed similar scenario.
Want to pop up window from server side

And also refer the following KB article.
Calling radalert from codebehind (all versions of RadWindow)

Thanks,
Shinu.
0
ALEX
Top achievements
Rank 1
answered on 14 Feb 2011, 03:57 PM
Hi Shinu,

           Thx for your help. I got it.

As per my Ques:
One more thing, when i call above function 1st time i saw js error in IE. And then 2nd i don't see js error. What wrong it? Do you have any idea?

Best Regards,
0
Georgi Tunev
Telerik team
answered on 16 Feb 2011, 06:47 AM
Hello Alex,

What was the error?

Regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
ALEX
Top achievements
Rank 1
answered on 20 Feb 2011, 02:49 PM
Hi Team,

          Thank your reply. It is solved by myself.
Best Regards,
Tags
Window
Asked by
ALEX
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
ALEX
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or