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

radalert does not work in RadGrid

8 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jaime
Top achievements
Rank 1
Jaime asked on 14 Sep 2010, 10:28 PM
Hello... I have RadGrid 5.1.1.0 and after the execution of a command, I want to display an alert telling about the success or failure of the process..... I tried several ways to accomplish this (all of them from Telerik pages) but none worked.

For example, I have this in gdvProcesos_ItemCommand event of the RadGrid:

if (e.CommandName == "Ejecutar")
{
 
/* Some long process */
 
  string msg = "success or error message";
  RadAjaxManager1.ResponseScripts.Add("radalert('" + msg + "', 330, 210);");
}

I have also a RadAjaxManager control, defined this way:
<rad:RadWindowManager runat="server" ID="wndManager" Skin="WebBlue" Language="es-CL">
    <Windows>
        <rad:RadWindow ID="wndJerarquia" VisibleStatusbar="false"  VisibleTitlebar="false" NavigateUrl="VerJerarquia.aspx" VisibleOnPageLoad="false" runat="server" Modal="true" DestroyOnClose="true" />
    </Windows>
</rad:RadWindowManager>
<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="gdvProcesos">
            <UpdatedControls>
                <rad:AjaxUpdatedControl ControlID="gdvProcesos" />
            </UpdatedControls>
        </rad:AjaxSetting>
    </AjaxSettings>
</rad:RadAjaxManager>


Any help will be greatly appreciated. Thanks

Jaime

8 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 15 Sep 2010, 12:41 PM
Hi Jaime,

I reviewed the provided code and I can confirm it is proper. Can you try debugging and specify if the line with the ResponseScripts is executed?

Best wishes,
Iana
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
Jaime
Top achievements
Rank 1
answered on 15 Sep 2010, 03:12 PM
Yes.. that instruction is executed. This is the data shown in immediate window:

RadAjaxManager1.ResponseScripts
{System.Collections.Specialized.StringCollection}
    Count: 1
    IsReadOnly: false
    IsSynchronized: false
    SyncRoot: {object}

RadAjaxManager1.ResponseScripts[0]
"radalert('002 - El grupo indicado no existe.', 330, 210);"

By using the development tools of Internet Explorer 8, no "redalert" function call is redendered.

Also I am attaching a picture that shows the RadGrid with a detail grid. The button that is enclosed with a red circle is what causes the execution of the ItemCommand event.

Thanks
Jaime
0
Iana Tsolova
Telerik team
answered on 16 Sep 2010, 12:46 PM
Hello Jaime,

Can you try using the Page.RegisterStartupScript() method and see if it works thus?

Sincerely yours,
Iana
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
Jaime
Top achievements
Rank 1
answered on 21 Sep 2010, 10:49 PM
Hello...

It did not work either. After the itemCommand event is executed, this is the HTML of the grid:

<COLGROUP>
<COL width=20>
<COL>
<COL>
<COL>
<COL>
<COL>
<COL>
<COL>
<COL>
<COL></COLGROUP>
<THEAD>
<TR>
<TH class=GridHeader_WebBlue scope=col> </TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl02','', 'gdvProcesos', event)">Area</A></TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl05','', 'gdvProcesos', event)">Concepto</A></TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl06','', 'gdvProcesos', event)">Estado</A></TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl07','', 'gdvProcesos', event)">Moneda</A></TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl08','', 'gdvProcesos', event)">Fec.Contable</A></TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl09','', 'gdvProcesos', event)">Tipo Ejec.</A></TH>
<TH class=GridHeader_WebBlue scope=col><A title="Click here to sort" href="javascript:RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl02$ctl01$ctl10','', 'gdvProcesos', event)">Fec.Ejecucion</A></TH>
<TH style="TEXT-ALIGN: center" class=GridHeader_WebBlue scope=col>Hora</TH>
<TH class=GridHeader_WebBlue scope=col>Acciones</TH></TR></THEAD>
<TBODY>
<TR class=GridRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl04$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>C001-RENTAS VITALICIAS</TD>
<TD style="WIDTH: 200px" align=middle>MMM-CONCEPTO MANUAL</TD>
<TD align=middle>PEN</TD>
<TD align=middle>UF</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>I</TD>
<TD align=right>13-09-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_lblHora>00:00</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidArea value=C001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidTipoEjecucion value=I type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidFecEjecucion value=13-09-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidMoneda value=UF type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl04_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_btnEjecutar title="Ejecutar interfaz." onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl04$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl04_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl04$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl04$btnAprobar> </TD></TR>
<TR class=GridAltRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl07$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RVRS2-RENTA PRIV. SOBREVIVENCIA</TD>
<TD align=middle>PEN</TD>
<TD align=middle>CLP</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>B</TD>
<TD align=right>13-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_lblHora>00:00</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidTipoEjecucion value=B type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidFecEjecucion value=13-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidMoneda value=CLP type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl07_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_btnEjecutar title="No se puede ejecutar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl07$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl07_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl07$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl07$btnAprobar> </TD></TR>
<TR class=GridRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl10$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RVRS1-RENTA PRIV. SOBREVIVENCIA</TD>
<TD align=middle>PEN</TD>
<TD align=middle>CLP</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>B</TD>
<TD align=right>10-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_lblHora>00:00</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidTipoEjecucion value=B type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidFecEjecucion value=10-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidMoneda value=CLP type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidGrupoTad value=1 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl10_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_btnEjecutar title="No se puede ejecutar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl10$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl10_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl10$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl10$btnAprobar> </TD></TR>
<TR class=GridAltRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl13$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RVRG2-RENTA GARANTIZADA</TD>
<TD align=middle>PEN</TD>
<TD align=middle>CLP</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>B</TD>
<TD align=right>12-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_lblHora>00:00</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidTipoEjecucion value=B type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidFecEjecucion value=12-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidMoneda value=CLP type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl13_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_btnEjecutar title="No se puede ejecutar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl13$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl13_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl13$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl13$btnAprobar> </TD></TR>
<TR class=GridRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl16$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RVCR9-NUEVO CONCEPTO RENTAS</TD>
<TD align=middle>PEN</TD>
<TD align=middle>USD</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>I</TD>
<TD align=right>28-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_lblHora>12:58</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidTipoEjecucion value=I type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidFecEjecucion value=28-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidMoneda value=USD type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl16_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_btnEjecutar title="Ejecutar interfaz." onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl16$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl16_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl16$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl16$btnAprobar> </TD></TR>
<TR class=GridAltRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl19$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RVCR2-CREDITOS RENTAS</TD>
<TD align=middle>PEN</TD>
<TD align=middle>CLP</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>B</TD>
<TD align=right>15-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_lblHora>00:00</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidTipoEjecucion value=B type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidFecEjecucion value=15-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidMoneda value=CLP type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl19_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_btnEjecutar title="No se puede ejecutar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl19$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl19_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl19$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl19$btnAprobar> </TD></TR>
<TR class=GridRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl22$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RVC10-RENTA POSTERIOR</TD>
<TD align=middle>PEN</TD>
<TD align=middle>CLP</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>B</TD>
<TD align=right>05-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_lblHora>00:00</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidTipoEjecucion value=B type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidFecEjecucion value=05-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidMoneda value=CLP type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl22_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_btnEjecutar title="No se puede ejecutar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl22$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl22_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl22$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl22$btnAprobar> </TD></TR>
<TR class=GridAltRow_WebBlue>
<TD><INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_GECBtnExpandColumn title=Expand onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl25$GECBtnExpandColumn', '', 'gdvProcesos', event); return false;" alt=Expand src="http://localhost:4000/SIC/RadControls/Grid/Skins/WebBlue/SinglePlus.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$GECBtnExpandColumn></TD>
<TD style="WIDTH: 200px" align=middle>RV001-AREA DE RENTAS</TD>
<TD style="WIDTH: 200px" align=middle>RRRRR-CONCEPTO DE PRUEBA</TD>
<TD align=middle>PEN</TD>
<TD align=middle>UF</TD>
<TD align=right>26-02-2010</TD>
<TD align=middle>I</TD>
<TD align=right>28-02-2010</TD>
<TD align=middle><SPAN id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_lblHora>23:35</SPAN> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidEmpresa value=E001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidEmpresa> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidArea value=RV001 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidArea> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidPeriodo value=201002 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidPeriodo> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidTipoEjecucion value=I type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidTipoEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidFecEjecucion value=28-02-2010 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidFecEjecucion> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidCantidadUsuarios value=0 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidCantidadUsuarios> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidMoneda value=UF type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidMoneda> <INPUT id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidGrupoTad value=2 type=hidden name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$hidGrupoTad> </TD>
<TD><A id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_lnkJerarquia href="javascript:OpenWindow(document.getElementById('gdvProcesos_ctl01_ctl09_Detail20_ctl25_hidGrupoTad').value)"><IMG alt="Ver Jerarquía" src="http://localhost:4000/SIC/images/jerarquiac.gif"></A>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_btnEjecutar title="Ejecutar interfaz." onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl25$btnEjecutar', '', 'gdvProcesos', event); return false;" alt="Ejecutar Interfaz" src="http://localhost:4000/SIC/images/BtnEjecuta.png" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$btnEjecutar>   <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=gdvProcesos_ctl01_ctl09_Detail20_ctl25_btnAprobar title="No se puede aprobar la interfaz en este estado ni con este tipo de ejecución." disabled onclick="RadGridNamespace.AsyncRequest('gdvProcesos$ctl01$ctl09$Detail20$ctl25$btnAprobar', '', 'gdvProcesos', event); return false;" alt="Aprobar Interfaz" src="http://localhost:4000/SIC/images/Aprobar.gif" type=image name=gdvProcesos$ctl01$ctl09$Detail20$ctl25$btnAprobar> </TD></TR></TBODY>

as you see, no radalert call is rendered.

Cheers
Jaime
0
Iana Tsolova
Telerik team
answered on 24 Sep 2010, 09:14 AM
Hi Jaime,

Can you send me the sample project for further debugging or the full page code you are using?

Kind regards,
Iana
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
Jaime
Top achievements
Rank 1
answered on 24 Sep 2010, 06:34 PM
Hello... please see the code below. It is a very simple page I created that behaves the same way as the real page.

The page contains a grid with a detail table. That detail table contains a pencil. By clicking it and running the corresponding command, the radalert does not appear.

ASPX file

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PruebaTelerik.aspx.cs" Inherits="PruebaTelerik" %>
 
<%@ Register Assembly="RadAjax.Net2"     Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <rad:RadAjaxManager ID="mgrAjax" runat="server">
            <AjaxSettings>
                <rad:AjaxSetting AjaxControlID="grdParent">
                    <UpdatedControls>
                        <rad:AjaxUpdatedControl ControlID="grdParent" />
                    </UpdatedControls>
                </rad:AjaxSetting>
            </AjaxSettings>
        </rad:RadAjaxManager>
        <rad:RadGrid ID="grdParent" runat="server" EnableAJAX="True" GridLines="None" OnDetailTableDataBind="grdParent_DetailTableDataBind"
            OnItemCommand="grdParent_ItemCommand" Skin="WebBlue">
            <MasterTableView>
                <DetailTables>
                    <rad:GridTableView runat="server" Name="tblChild">
                        <RowIndicatorColumn Visible="False">
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Resizable="False" Visible="False">
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <rad:GridTemplateColumn UniqueName="TemplateColumn">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnTest" runat="server" CommandName="TestCommand" ImageUrl="~/RadControls/Grid/Skins/Edit.gif" />
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                        </Columns>
                    </rad:GridTableView>
                </DetailTables>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn Resizable="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
            </MasterTableView>
        </rad:RadGrid></div>
    </form>
</body>
</html>


Codebehind file

using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
 
public partial class PruebaTelerik : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<string> data = new List<string>(5); ;
            data.Add("one");
            data.Add("two");
            data.Add("three");
            data.Add("four");
            data.Add("five");
 
            grdParent.DataSource = data;
            grdParent.DataBind();
        }
    }
    protected void grdParent_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e)
    {
        List<string> data = new List<string>(2);
        data.Add("d1");
        data.Add("d2");
 
        e.DetailTableView.DataSource = data;
    }
    protected void grdParent_ItemCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
        if (e.CommandName == "TestCommand")
            mgrAjax.ResponseScripts.Add("radalert('testing....', 330, 210);");
    }
}

RadAjax Manager version is 1.8.3.0
RadGrid version is 5.1.1.0

Thanks
Jaime
0
Accepted
Iana Tsolova
Telerik team
answered on 27 Sep 2010, 12:33 PM
Hi Jaime,

In order a rad alert to be displayed, you need to add a RadWindowManager control on the page. Also when the grid is ajaxified with the ajax manager, enabling its ajax is not necessary.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="RadAjax.Net2"     Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadWindow.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript">
        function showAlert() {
            window.radalert('testing....', 330, 210);
        }
    </script>
    <div>
        <rad:RadAjaxManager ID="mgrAjax" runat="server">
            <AjaxSettings>
                <rad:AjaxSetting AjaxControlID="grdParent">
                    <UpdatedControls>
                        <rad:AjaxUpdatedControl ControlID="grdParent" />
                    </UpdatedControls>
                </rad:AjaxSetting>
            </AjaxSettings>
        </rad:RadAjaxManager>
        <rad:RadGrid ID="grdParent" runat="server" EnableAJAX="false" GridLines="None" OnDetailTableDataBind="grdParent_DetailTableDataBind"
            OnItemCommand="grdParent_ItemCommand" Skin="WebBlue">
            <MasterTableView>
                <DetailTables>
                    <rad:GridTableView runat="server" Name="tblChild">
                        <Columns>
                            <rad:GridTemplateColumn UniqueName="TemplateColumn">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnTest" runat="server" CommandName="TestCommand" ImageUrl="~/RadControls/Grid/Skins/Edit.gif" />
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                        </Columns>
                    </rad:GridTableView>
                </DetailTables>
            </MasterTableView>
        </rad:RadGrid>
        <rad:RadWindowManager ID="RadWindowManager1" runat="server">
        </rad:RadWindowManager>
    </div>
    </form>
</body>
</html>

protected void Page_Load(object sender, EventArgs e)
{
    grdParent.NeedDataSource += new Telerik.WebControls.GridNeedDataSourceEventHandler(grdParent_NeedDataSource);        
}
void grdParent_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e)
{
    List<string> data = new List<string>(5); ;
    data.Add("one");
    data.Add("two");
    data.Add("three");
    data.Add("four");
    data.Add("five");
    grdParent.DataSource = data;
}
protected void grdParent_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e)
{
    List<string> data = new List<string>(2);
    data.Add("d1");
    data.Add("d2");
    e.DetailTableView.DataSource = data;
}
protected void grdParent_ItemCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
{
    if (e.CommandName == "TestCommand")
        mgrAjax.ResponseScripts.Add("window.radalert('testing....', 330, 210);");
}


All the best,
Iana
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
Jaime
Top achievements
Rank 1
answered on 27 Sep 2010, 07:45 PM
Helo Iana! Thanks a lot, it works now.

Cheers
Jaime
Tags
Grid
Asked by
Jaime
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Jaime
Top achievements
Rank 1
Share this question
or