.aspx (BOTÓN A)
<dx:ASPxButton ID="btnXlsExport" runat="server" class="boton-full" AutoPostBack="false"
Cursor="pointer" EnableDefaultAppearance="False" EnableTheming="False" Height="30px"
Text="Exportar" Width="110px" ClientIDMode="AutoID">
<Image Url="~/img/icon/page_white_excel.png">
</Image>
<ClientSideEvents Click="Export" />
</dx:ASPxButton>
____________________________________
.aspx (BOTÓN B)
<dx:ASPxButton ID="btnExport" ClientInstanceName="btnExport" runat="server" Text=""
ClientVisible="false" OnClick="btnExport_Click">
</dx:ASPxButton>
____________________________________
<script>
function Export(s, e) {
if (gvAdmHojaRuta.GetVisibleRowsOnPage() > 0) {
btnExport.DoClick();
} else {
alert('No hay datos para exportar');
}
}
No hay comentarios:
Publicar un comentario