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

[Solved] Undefined in RadAjaxPanel

2 Answers 180 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Yamil
Top achievements
Rank 1
Yamil asked on 26 May 2008, 06:32 PM
Hi.
I have a RadTabStripd that have some RadGrids and then call various usercontrol to edit data. I am using Javascript to get some data and then call a RadWindow to edit item.Everything's  OK but the user wants to see a "splash" to know something is happening, so I surround the tabstrip inside a RadPanel to get the desired effect. Now i work like they want but I get an javascript error when I try to get RadGrid info I got "undefined object" . The code is:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
 
    //------------------------------------------------------------
    //
    //------------------------------------------------------------
    function showDlg(oSender) {
      var grid = $find("<%= RadGridPlanes.ClientID %>");
      var row = grid.get_masterTableView();
      var selectedRows = row.get_selectedItems();
      var gridRow = selectedRows[0];
      var codPlan = row.getCellByColumnUniqueName(gridRow, "CodPlan").innerHTML;
      var numVersion = row.getCellByColumnUniqueName(gridRow, "NumVersion").innerHTML;
     
      var dlgName;
      var codTarifa;
      var codControl;
     
      if (oSender == 'CERTIFICADO')
      {
         dlgName = "DlgCertificado";
         codTarifa = row.getCellByColumnUniqueName(gridRow, "CodTarifaCert").innerHTML;
         codControl = row.getCellByColumnUniqueName(gridRow, "CodControlCert").innerHTML;
      }
      else
      {
         dlgName = "DlgAsegurado";
         codTarifa = row.getCellByColumnUniqueName(gridRow, "CodTarifaAseg").innerHTML;
         codControl = row.getCellByColumnUniqueName(gridRow, "CodControlAseg").innerHTML;
      }
     
      var url = codControl + "?Datos=" + codPlan + "|" + numVersion + "|" + codTarifa;
   var oWnd = window.radopen(null, dlgName);
      oWnd.SetUrl(url);

      return false;
    }
    
 </script>
    </telerik:RadScriptBlock>

<table>
 <tr>
    <td style="width: 405px; height: 35px;" align="right"><input id="Button1" type="button" value="Tarifa Certificado" onclick="showDlg('CERTIFICADO');" style="width: 179px"/>
     </td>
     <td style="width: 445px; height: 35px;" align="right"><input id="Button2" type="button" value="Tarifa Asegurado" onclick="showDlg('ASEGURADO');" />
      </td>
     </tr>
</table>

If i take out the RadAjaxPanel all works OK .

TIA

Yamil

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 May 2008, 07:28 AM
Hi Yamil,

Go through the following forum link which discuss a similar error.
RadAjaxPanel and "'undefined' is null or not an object" error

Shinu.
0
Yamil
Top achievements
Rank 1
answered on 28 May 2008, 03:48 AM
Again, Thanks Shinu for this info...
Tags
Ajax
Asked by
Yamil
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Yamil
Top achievements
Rank 1
Share this question
or