jQuery UI Widgets › Forums › Grid › Render not working
This topic contains 3 replies, has 2 voices, and was last updated by Zabelsky 6 years ago.
-
AuthorRender not working Posts
-
Hello.
I have some codevar 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?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,plsHello 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 HristovjQWidgets team
http://www.jqwidgets.comThx for help.
have a good day -
AuthorPosts
You must be logged in to reply to this topic.