jQWidgets Forums

jQuery UI Widgets Forums Grid Incorrectly working cellsrenderer

This topic contains 2 replies, has 2 voices, and was last updated by  Martin 6 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Incorrectly working cellsrenderer #101165

    Zabelsky
    Participant

    Hello.

    var getGridWikiSettings = function () {
        return {
            altrows: true,
            width: "100%",
            height: '90%',
            sortable: true,
            filterable: true,
            groupable: true,
            pageable: true,
            pagesize: 100,
            enablehover: true,
            showtoolbar: true,
            pagesizeoptions: ["3", "20", "50", "100", "200"],
            columnsresize: true,
            columnsreorder: true,
            localization: getLocalization("ru"),
            rowsheight: 28,
            autoshowcolumnsmenubutton: false
        };
    };
     $scope.selectFile = function (row) {
                var data = $('#grid_wiki').jqxGrid('getrowdata', row);
                $scope.pdfUrl = "/wikiFiles\/" + countryForPdf + "\/" + data.Name;
                $scope.loading = "";
            };
    
            $scope.downloadFile = function () {
                document.getElementById('downloadWiki').click();
            }
    
            var showRenderer = function (row, column, value) {            
                var html = "<div>" +
                    "<a ng-click=\"selectFile(" + row + ", 'settings')\" class=\"cursor: pointer\">Show</a>" +
                    "</div>";
                return html;
            };
    
            var downloadRenderer = function (row, column, value) {           
                var html = "<div>" +
                    "<a ng-click=\"downloadFile()\" class=\"cursor: pointer\">Download</a>" +
                    "</div>";
                return html;
            };
    $scope.settings = getGridWikiSettings();
            $scope.settings.filterable = false;
            $scope.settings.columnsmenu = false;
            $scope.settings.groupable = false;
            $scope.settings.source = new $.jqx.dataAdapter({ localdata: [] });
            $scope.settings.columns = [
                { text: "Name", datafield: "Title", width: '60%' },
                { text: "Download", datafield: "Id", width: '20%', cellclassname: "mg", cellsrenderer: downloadRenderer, type: "string" },
                { text: "Show", datafield: "Name", width: '20%', cellclassname: "mg", cellsrenderer: showRenderer, type: "string" }
            ];

    Why buttons download and show incorrect working?
    Clarifying for u: for example.i`m selected first row,clicking on 2th row on button show/download and this working,but when i clicked on show/download at selected row,that nothing happens.
    What`s happenned?

    Incorrectly working cellsrenderer #101166

    Zabelsky
    Participant

    A host day could not find the answer,decided to postpone on tomorrow and write on forum.
    I came to work in the morning and came up with a solution almost immediately…

    $scope.settings.selectionmode = ‘none’ is resolving my problem.
    Apparently the reason was in choosing the string
    Sorry for the trouble.

    Incorrectly working cellsrenderer #101173

    Martin
    Participant

    Hello Alexey Zabelsky,

    Thank you for your explanation.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.