javascript - How to bind textbox into tabalinas/jsgrid and filter on keyup? -
hello guys want bind external textbox
angular-js-grid . have done stuck make filtering external textbox
in grid.
what have tried.
1 html
<div class="float-right"> <div class="form-group form-material"> <label class="control-label">search</label> <input class="form-control empty" id="searchingrid" name="inputcompany" type="text"> </div> </div> <div ng-jsgrid="gridconfig"></div> //this js-grid
2.js
var gridinstance; var active = 0; $("body").on('keyup', '#searchingrid', function(event) { event.preventdefault(); var self = $(this); console.log("asdasd",self.val().length) if (self.val().length != 0){ self=gridinstance; } }); $scope.gridconfig = { height: "auto", width: "100%", heading: true, filtering: true, inserting: true, editing: true, paging: true, sorting: false, selecting: true, autoload: true, pagesize: 15, pagebuttoncount: 5, ondataloading: function(args) { gridinstance = args.grid; }, controller: { loaddata: function() { return $q(function(resolve, reject) { $.get('web-service/web/master/display', { inactive: active }, function(data, textstatus, xhr) { resolve(data) }); }); }, }
i want make filter(search) how datatable search in jsgrid, means when user type in textbox search in grid on keyup
Comments
Post a Comment