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

I need to show a windows warning that the grid has no data.

0 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Benjamim
Top achievements
Rank 1
Benjamim asked on 23 Jul 2012, 11:50 PM
I need to show a windows warning that the grid has no data.

$('#grid').kendoGrid({
    height: 520,
    sortable: true,
    pageable: true,
    groupable: true,
    dataSource: new kendo.data.DataSource({
        serverPaging: true,
        serverSorting: false,
        pageSize: RecebimentoAutomatico.Configuracoes.RegistrosPorPagina,
        transport: {
            read: {
                url: function () { return UrlComParametros() },
                contentType: 'application/json; charset=utf-8'
            }
        },
        schema: { data: 'dados', total: 'total' }
    }),
    columns: [
            { field: 'IdentificadorProcessamento', title: ' ', template: '<input type="checkbox" value="#=IdentificadorProcessamento#">', width: 30, sortable: false },
            { field: 'NumeroNota', title: 'N° da Nota', width: 60 },
            { field: 'DataEmissao', title: 'Data Emissão', width: 100 },
            { field: 'DataEntrada', title: 'Data Entrada', width: 95 },
            { field: 'NomeFornecedor', title: 'Parceiro', width: 300, template: '<span rel="tooltip" title="#=NomeFornecedor#">#=NomeFornecedor#</span>' },
            { field: 'EstruturaValida', title: 'Consulta NFe Nacional', width: 100, template: '<div style="text-align: center;"><i class="icon-24 icon-efisc-restricted"></i></div>' },
            { field: 'EstruturaValida', title: 'Integridade do XML', width: 100, template: '<div style="text-align: center;"><i class="icon-24 # if(EstruturaValida == true) { #icon-efisc-check#}else{#icon-efisc-error#}#"></i> <a href="#=UrlDetalhesValidacao#" title="Ver detalhes da validação" href=""><i class="icon-24 icon-efisc-lupa"></i></a></div>' },
            { field: 'ValidaNaSefaz', title: 'Válido na Sefaz', width: 100, template: '<div style="text-align: center;"><i class="icon-24 # if(ValidaNaSefaz == true) { #icon-efisc-check#}else{#icon-efisc-error#}#"></i> <a href="#=UrlDetalhesValidacao#" title="Ver detalhes da validação" href=""><i class="icon-24 icon-efisc-lupa"></i></a></div>' },
            { field: 'ValidaNoSystax', title: 'Válido no Systax', width: 100, template: '<div style="text-align: center;"><i class="icon-24 # if(ValidaNoSystax == true) { #icon-efisc-check#}else{#icon-efisc-error#}#"></i> <a href="#=UrlDetalhesSystax#" title="Ver detalhes da validação" href=""><i class="icon-24 icon-efisc-systax"></i></a></div>' },
            { field: 'ValidaNoValidate', title: 'Válido no Validate', width: 105, template: '<div style="text-align: center;"><i class="icon-24 # if(ValidaNoValidate == true) { #icon-efisc-check#}else{#icon-efisc-error#}#"></i> <a href="#=UrlDetalhesValidateReceita#" target="_blank" title="Ver detalhes da RFB" href=""><i class="icon-24 icon-efisc-rfb"></i></a><a href="#=UrlDetalhesValidateSintegra#" target="_blank" title="Ver detalhes do Sintegra" href=""><i class="icon-24 icon-efisc-sintegra"></i></a></div>' },
            { field: 'ChaveNFe', title: 'Integração', width: 180, template: sapTemplate },
            { field: 'UrlVisualizar', title: 'NFe', width: 50, template: '<a href="#=UrlVisualizar#" title="Visualizar Nota Fiscal Eletrônica"><i class="icon-24 icon-efisc-lupa"></i></a><a href="#=UrlVisualizarImpressao#" title="Visualizar Nota Fiscal Eletrônica para Impressão"><i class="icon-24 icon-efisc-printer"></i></a>' },
            { command: { text: "Details", className: "details-button" }, title: " ", width: "110px" }
    ],
    dataBound: function () {
        if (this.dataSource.group().length == 0) {
            setTimeout(function () {
                $(".k-grouping-header").html("Arraste uma coluna aqui para agrupar");
            });
        }
 
 
 
        //Inicia tooltips
        $('#grid span').tooltip();
        MostraTotal();
 
    }
});

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Benjamim
Top achievements
Rank 1
Share this question
or