Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
183 views
Hi Team,

  I'm getting below javascript error. I'm using Q22010 version.

  Accroding to my requirement with help of  "Load on Demand" demo implemented.

  In aspx page I write below  code
  <telerik:RadAjaxManager runat="server" ID="ramMasterData">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

and in my user control page also below code I write:
 <telerik:RadAjaxManager ID="ramRes" runat="server" EnableAJAX="true" OnAjaxRequest="ramRes_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ramRes">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGroup" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rgGroup">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGroup" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
   and in ascx.cs file

protected void ramRes_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        try
        {
            if (e.Argument.StartsWith("Rebind$"))
            {
                //get groupId& Row Position from e.Argument
                string[] arrVal = e.Argument.Split('$');
                var groupId = arrVal[1].Trim();
                var rowpos = arrVal[2].Trim();

                rgGroup.MasterTableView.HierarchyDefaultExpanded = false;

                //refresh the Approvers list
                rgGroup.Rebind();

                //Call the javascript function to expand the parent node.
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadscript1", "ExpandMasterTableViewItem(" + rowpos + ");", true);
            }
            else if (e.Argument.StartsWith("Rebind"))
            {
                rgGroup.Rebind();
            }
        }
runtime I getting below error.

 Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_ContentPlaceHolder1_rgGroup_userControl_ramRes' can't be added to the application.
Thanks in Advance.
Mr.Perfect
Perfect
Top achievements
Rank 1
 asked on 18 Jun 2012
0 answers
118 views
I have a grid which dates entering valid but I want to change the state will not let me stay in the initial state can help me


 void list1_SelectedIndexChanged(
object sender, RadComboBoxSelectedIndexChangedEventArgs e)

{

RadComboBox estado = (RadComboBox)sender;

GridEditFormItem editItem = (GridEditFormItem)estado.NamingContainer;

estado_ps4 = estado.SelectedValue;

////

//mensaje = estado.SelectedValue;

//string html = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html);

 

switch (estado.SelectedValue)

{

case "Adjudicado":

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Por Adjudicar":

editItem[

"contratista_prc"].Visible = false;

editItem[

"montocontratado_prc"].Visible = false;

editItem[

"observacion_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = false;

break;

case "Contratista Fallido":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Desierto":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"contratista_prc"].Visible = false;

editItem[

"montocontratado_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = true;

editItem[

"observacion_prc"].Visible = false;

break;

}

////

//mensaje = estado.SelectedValue;

//string html1 = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html1);

////

//estado_ps4 = estado.SelectedValue;

}

void montoadjudicado_TextChanged(object sender, EventArgs e)

{

RadNumericTextBox monto = (RadNumericTextBox)sender;

GridEditFormItem editItem = (GridEditFormItem)monto.NamingContainer;

if (Convert.ToDouble(monto.Value) > objpaso4.montoreferencial_ps2)

editItem[

"observacion_prc"].Visible = true;

else

editItem[

"observacion_prc"].Visible = false;

}

void list_PreRender(object sender, EventArgs e)

{

RadComboBox estado = (RadComboBox)sender;

GridEditFormItem editItem = (GridEditFormItem)estado.NamingContainer;

RadDateTimePicker fecha = (RadDateTimePicker)editItem["fechapublicacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"fechapublicacion_ps4"].Enabled = false;

else

editItem[

"fechapublicacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["preguntasdesde_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"preguntasdesde_ps4"].Enabled = false;

else

editItem[

"preguntasdesde_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["preguntashasta_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"preguntashasta_ps4"].Enabled = false;

else

editItem[

"preguntashasta_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["recepcionofertas_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"recepcionofertas_ps4"].Enabled = false;

else

editItem[

"recepcionofertas_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["aperturaofertas_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"aperturaofertas_ps4"].Enabled = false;

else

editItem[

"aperturaofertas_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["solicitarconvalidacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

else

editItem[

"solicitarconvalidacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["entregaconvalidacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

else

editItem[

"entregaconvalidacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["actacalificacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"actacalificacion_ps4"].Enabled = false;

else

editItem[

"actacalificacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["adjudicacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"adjudicacion_ps4"].Enabled = false;

else

editItem[

"adjudicacion_ps4"].Enabled = true;

////

//mensaje = estado_ps4;

//string html2 = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html2);

////

////

//mensaje = estado.SelectedValue + "-------";

//string html3 = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html3);

////

if(estado_ps4.Equals(""))

switch (estado.SelectedValue)

{

case "Adjudicado":

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Por Adjudicar":

editItem[

"contratista_prc"].Visible = false;

//editItem["montocontratado_prc"].Visible = false;

editItem[

"observacion_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = false;

break;

case "Contratista Fallido":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Desierto":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"contratista_prc"].Visible = false;

editItem[

"montocontratado_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = true;

editItem[

"observacion_prc"].Visible = false;

break;

}

estado_ps4 = estado.SelectedValue;

}

void tipocontratacion_PreRender(object sender, EventArgs e)

{

TextBox texto = (TextBox)sender;

GridEditFormItem editItem = (GridEditFormItem)texto.NamingContainer;

RadDateTimePicker fecha = (RadDateTimePicker)editItem["iniciopuja_ps4"].Controls[0];

if (!texto.Text.ToLower().Contains("subasta inversa") || fecha.SelectedDate < DateTime.Now)

editItem[

"iniciopuja_ps4"].Enabled = false;

fecha = (

RadDateTimePicker)editItem["finpuja_ps4"].Controls[0];

if (!texto.Text.ToLower().Contains("subasta inversa") || fecha.SelectedDate < DateTime.Now)

editItem[

"finpuja_ps4"].Enabled = false;

if (texto.Text.ToLower().Contains("subasta inversa"))

editItem[

"negociacion_prc"].Enabled = true;

else

editItem[

"negociacion_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

}

private DateTime verificarFecha(string fecha)

{

if (fecha.Equals(""))

return Convert.ToDateTime("1900-01-01");

else

return Convert.ToDateTime(fecha);

}

private bool validarCampo(string campo, DateTime fecha, ValidacionFecha[] objvalidacion)

{

bool respuesta = false;

string estado = "";

DateTime fecha2 = DateTime.Now;

for (int i = 0; i < objvalidacion.Length; i++)

{

if (objvalidacion[i].campofecha_vaf.Equals(campo))

{

estado =

"encontro";

switch (objvalidacion[i].campovalidar_vaf)

{

case "fechapublicacion_ps4":

fecha2 = objpaso4.fechapublicacion_ps4;

break;

case "preguntasdesde_ps4":

fecha2 = objpaso4.preguntasdesde_ps4;

break;

case "preguntashasta_ps4":

fecha2 = objpaso4.preguntashasta_ps4;

break;

case "recepcionofertas_ps4":

fecha2 = objpaso4.recepcionofertas_ps4;

break;

case "aperturaofertas_ps4":

fecha2 = objpaso4.aperturaofertas_ps4;

break;

case "solicitarconvalidacion_ps4":

fecha2 = objpaso4.solicitarconvalidacion_ps4;

break;

case "entregaconvalidacion_ps4":

fecha2 = objpaso4.entregaconvalidacion_ps4;

break;

case "actacalificacion_ps4":

fecha2 = objpaso4.actacalificacion_ps4;

break;

case "iniciopuja_ps4":

fecha2 = objpaso4.iniciopuja_ps4;

break;

case "finpuja_ps4":

fecha2 = objpaso4.finpuja_ps4;

break;

case "adjudicacion_ps4":

fecha2 = objpaso4.adjudicacion_ps4;

break;

}

switch (objvalidacion[i].operador_vaf)

{

case "Entre":

if (objvalidacion[i].unidadtiempo_vaf.Equals("Das"))

{

if (fecha >= fecha2.AddDays(objvalidacion[i].diainicio_vaf) && fecha <= fecha2.AddDays(objvalidacion[i].diafinal_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe estar entre " + objvalidacion[i].diainicio_vaf + " y " + objvalidacion[i].diafinal_vaf + " das despus de " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

else

{

if (fecha >= fecha2.AddMinutes(objvalidacion[i].diainicio_vaf) && fecha <= fecha2.AddMinutes(objvalidacion[i].diafinal_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe estar entre " + objvalidacion[i].diainicio_vaf + " y " + objvalidacion[i].diafinal_vaf + " minutos despus de " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

break;

case "Mayor a":

if (objvalidacion[i].unidadtiempo_vaf.Equals("Das"))

{

if (fecha >= fecha2.AddDays(objvalidacion[i].diainicio_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe ser mayor en " + objvalidacion[i].diainicio_vaf + " das a " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

else

{

if (fecha >= fecha2.AddMinutes(objvalidacion[i].diainicio_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe ser mayor en " + objvalidacion[i].diainicio_vaf + " minutos a " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

break;

}

}

else

estado =

"no encontro";

}

if (estado.Equals("no encontro"))

return true;

else

return respuesta;

}

private void lanzarVentanaInformacion()

{

string html = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

Response.Write(html);

}

protected void RadGrid1_PreRender(object sender, EventArgs e)

{

if (rowindex > -1)

{

RadGrid1.Items[rowindex].Edit =

true;

rowindex = -1;

}

RadGrid1.Rebind();

}

}

}


Andrea
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
130 views
Hi there,

I am currently using the Modal RadDock popup example.  I have a save button that does some server side validation before saving to the database.  If the validation and save is successful, I would like to close the RadDock Modal popup.  Is there a way to close the RadDock via server side code?

Thanks
John
Slav
Telerik team
 answered on 18 Jun 2012
4 answers
116 views
Hallo,

i will change the snooze times for reminder. I didn't need snooze time 5, 10 and 15 minutes befor start event, because i have only all times events without time.

Regards,
Christian
Frank
Top achievements
Rank 1
 answered on 18 Jun 2012
11 answers
333 views
I'm not clear on how to do this and I assume someone out there has done it.
Slav
Telerik team
 answered on 18 Jun 2012
1 answer
52 views
my problem is that when I want to edit my appointment, the calendar that have to be linked not select default.
I manage to see a list of calendar that is in my database but I can not select a schedule to open by default to which it belongs.

Thank you for your help .
Peter
Telerik team
 answered on 18 Jun 2012
1 answer
67 views
I have a combobox and it fires event onItemsRequested. In the code, I bring some class objects and convert them to table and bind with combobox. So far so good. but when the data returned is zero then I want to show error message on the screen that combobox is empty because of the errorr... I update the label (id = lblError) during the code i.e. lblError.Text = "blah bla blah...." but it does not get updated on the screeen. I have ajaxmanager on the aspx page and lblError is included under the ajax settings. so I basically I want to update the label during Combobox_ItemRequested event.

  RadComboBox rcb = (RadComboBox)sender;
 rcb.ClearSelection();
 rcb.Text = string.Empty;
  rcb.Items.Clear();
  rcb.ShowMoreResultsBox = false;
  rcb.BackColor = System.Drawing.Color.Empty;
  
 Employee[] lemployee = Employee.Search();
  
                            if (lemployee.Length == 0)
                            {
                                lblError.Text = "No employee found";
                                return;
                            }
                            else
                            {
                                lblError.Text = "";
                                 
                                DataTable dtable = new DataTable();
                                DataRow orow;
  
                                dtable.Columns.Add("empID");
                                dtable.Columns.Add("name");
                                dtable.Columns.Add("SortFlag");
                                dtable.Columns.Add("Address");
  
                                foreach (Employee oemp  in lEmployee)
                                {
                                    orow = dtable.NewRow();
  
                                    orow["empID"] = oemp.empId.ToString();
                                    orow["name"] = oemp.name.Trim();
                                    orow["Address"] = oemp.Address;
                                    orow["SortFlag"] = "2";
  
                                    dtable.Rows.Add(orow);
                                }
  
                                rcb.DataSource = dtable;
                                rcb.DataBind();
}


Kalina
Telerik team
 answered on 18 Jun 2012
2 answers
352 views
Hello,

I am using telerik controls in a DotNetNuke 6 environment.  I have a RadListBox that needs to be refreshed on DataBind, but no matter what I try, it will not work.  The button is located in a RadWindow, and the page cannot postback upon closing of this window.  I've been trying to figure out the solution for hours and I have yet to find one.  Any help is appreciated, my code is below:

// My RadAjaxManager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdlb_assets" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdlb_assets">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdlb_assets" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7" />

// My RadListBox
<telerik:RadListBox ID="rdlb_assets" 
                                            runat="server" 
                                            AutoPostBack="true"
                                            EnableDragAndDrop="True" 
                                            OnClientDragStart="OnClientDragStart"
                                            OnClientDragging="OnClientDragging" 
                                            OnClientDropping="OnClientDropping" 
                                            OnClientLoad="RadListBoxLoad"
                                            OnClientItemDoubleClicked="doubleClick"
                                            EnableEmbeddedSkins="false"
                                            Skin="PrestoRadSkin" 
                                            AllowAutomaticUpdates="True">
                        </telerik:RadListBox>

// Javascript fired once the button to close the window is clicked
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); 

// Code behind for RadAjaxManager1_AjaxRequest
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "Rebind")
            {
                    rdlb_assets.Items.Clear();
                    rdlb_assets.DataSource = LoadAssets(thisContent);
                    rdlb_assets.DataBind();
            }
        }

Thank you!

Vanessa
Vanessa
Top achievements
Rank 1
 answered on 18 Jun 2012
5 answers
557 views
Hi

Having looked at some of the examples of people using radwindow and radgrid rebinds. I have worked on trying to get a radgrid rebind using javascript after altering some data in a modal window.

Although what i am trying gets only so far.

I call this following javascript function from the modal window

    function test()       
    {  
        var grid = $find("<%= RadGrid1.ClientID %>");  
        grid.ajaxRequest();      
    } 

the following code is called from the OnAjaxRequest="RadGrid1_AjaxRequest"  set in the telerik:RadAjaxManager
    protected void RadGrid1_AjaxRequest(object sender, AjaxRequestEventArgs e)  
    {  
        RadGrid1.Rebind();  
    } 

on doing this i am getting an "object doesnt support this property method error"

Any help would be greatly appreciated.

Thanks
Robert
Top achievements
Rank 1
 answered on 18 Jun 2012
1 answer
139 views
Hello. I present a simplified version of the implementation in which I found this problem.

Let's suppose I have a user control, called Redirector, which only has a link button for markup, and who's job it is to redirect to a certain page:
Public Class Redirector
Inherits UserControl
Private Sub lnkRedirect_Command(sender As Object, e As System.Web.UI.WebControls.CommandEventArgs) Handles lnkRedirect.Command
Response.Redirect("~/WebForm2.aspx")
End Sub
End Class

I want to put this on a page, inside of a RadWindow, along with some other controls. Here's the markup for my page:

<%@ Register TagPrefix="testApp" TagName="Redirector" Src="~/Redirector.ascx" %>
 
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1" >
 
    Page 1
    <br />
    <asp:Button ID="btnOpen" runat="server" Text="Open" />
 
 
    <trk:RadWindow runat="server" ID="MainRadWindow">
        <ContentTemplate>
     
            Hello there.
 
            <trk:RadAjaxPanel ID="InnerAjaxPanel" runat="server">
 
                <ul>
                    <li>
                        <testApp:Redirector ID="Redirector1" runat="server" />
                    </li>
                    <li>
                        <asp:Button ID="btnPostBack" runat="server" Text="Postback" />
                    </li>
                    <li>
                        <asp:Label ID="lblTime" runat="server" />
                    </li>
                </ul>
 
            </trk:RadAjaxPanel>
 
        </ContentTemplate>
    </trk:RadWindow>
        
 
</asp:Content>

And here is the code-behind for the page:

Public Class WebForm1
    Inherits System.Web.UI.Page
 
    Private Sub btnOpen_Command(sender As Object, e As System.Web.UI.WebControls.CommandEventArgs) Handles btnOpen.Command
        MainRadWindow.VisibleOnPageLoad = True
    End Sub
 
    Private Sub btnPostBack_Command(sender As Object, e As System.Web.UI.WebControls.CommandEventArgs) Handles btnPostBack.Command
        lblTime.Text = Now.TimeOfDay().ToString
    End Sub
End Class

If the user opens the RadWindow and immediately clicks the linkbutton, Page.Redirect() happens with no problem. However, if the user first clicks on btnPostback, and then clicks the linkbutton, the InnerAjaxPanel throws a javascript error.

    Microsoft JScript runtime error: Unable to get value of the property '_events': object is null or undefined

Could you please look into this and let me know what is causing the problem, and how I could fix it?

Thank you.
Maria Ilieva
Telerik team
 answered on 18 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?