jQuery UI Widgets Forums Grid Render not working

Tagged: , ,

This topic contains 3 replies, has 2 voices, and was last updated by  Zabelsky 6 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Render not working #103442

    Zabelsky
    Participant

    Hello.
    I have some code

    
    var btnRenderer = function(row, column, value) {
                var html = "<div>" +
                    "<span ng-click=\"logHook(" + row + ")\" class=\"icon  icon-view icon-fw marginR veiwIcon\"></span>" + "</div>";
                return html;
            };
    
    $scope.settings.columns = [
                { text: "", datafield: "Id", width: 70, cellclassname: "mg", cellsrenderer: btnRenderer, filterable: false, sortable: false, groupable: false, pinned: true, type: "string", hidden: false }
     ];
    
    $scope.logHook = function (index) {
                var d = $scope.settings.source._source.localdata;
                var value = d[index];
                var modalInstance = $uibModal.open({
                    animation: false,
                    templateUrl: "app/Views/Models/changeTrailer.html",
                    backdrop: "static",
                    controller: "changeTrailerController",
                    size: "lg",
                    resolve: {}
                });                
                modalInstance.result.then(function () {}, function() {});
            };
    

    When I click on span`s icon first time,that working is good. But second time is not working.
    When you try to catch a click on the span, the browser does not display anything, as if nothing happened and the click was not

    
    $(document).on('click','body *',function(){
            console.log($(this));     
    });
    

    AngularJS 1.7,but i think,that this is problem with grid
    What`s happenned?

    Render not working #103456

    Zabelsky
    Participant

    I was resolved this problem with help $('#grid').jqxGrid('updatebounddata', 'cells');
    But i have another problem
    if I was selected row and after click on THIS rows span,for example, logHook(row),that its not working
    But if I click immediately on span without select row,that working is good
    I don`t understand what happens
    Help me,pls

    Render not working #103508

    Hristo
    Participant

    Hello Zabelsky,

    The cellsrenderer callback function is not created for such functionality.
    You could override its style.
    Please, take a look at this demo:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/popupediting.htm?light
    You could use this approach to implement your logic on these buttons.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Render not working #103522

    Zabelsky
    Participant

    Thx for help.
    have a good day

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

You must be logged in to reply to this topic.