how do i always show kendo grid default data row at the end of data source angularjs -
how show default data entering row @ end of data source in kendo grid ??
i want have kendo grid input row @ grid bottom @ times. when enter data , press 'enter' key, data should inserted in grid top bottom default data entry row should stay @ grid bottom.
below grid initialization. have used angularjs / javascript kendo grid.
//-> grid sample data demo purposes var s1 = []; //@@@@@@@@@@@@@@@@@@@@@@@@@@ //-> grid start var configaddpaymentsenter = {}; configaddpaymentsenter.resizable = true configaddpaymentsenter.sortable = true; configaddpaymentsenter.pageable = false; //{ // input: true, // numeric: false // }; configaddpaymentsenter.editable = { createat: 'bottom' }; configaddpaymentsenter.columns = [ { field: "connectionreference", attributes: { "navi-text": "" }, headertemplate: 'connection reference', template: '<input ng-keydown="aa(this,$event)" type ="text" ng-model="dataitem.connectionreference" class="k-fill text-right aa" format-number ng-pattern="/^[0-9]+(\.[0-9]{2})?$/" />', width: "130px" // ,aggregates: ["count"], footertemplate: "total count: #=count#" }, { field: "contractnumber", attributes: { "navi-text": "" }, headertemplate: 'contract number', template: '<input ng-keydown="aa(this,$event)" type ="text" class="k-fill text-right aa" ng-model="dataitem.contractnumber" format-number ng-pattern="/^[0-9]+(\.[0-9]{2})?$/" />', width: "130px" }, { field: "amount", attributes: { "navi-text": "" }, headertemplate: 'amount', template: '<input ng-keydown="aa(this,$event)" kendo-numeric-text-box type ="text" class="k-fill text-right aa" ng-model="dataitem.amount" format-number ng-pattern="/^[0-9]+(\.[0-9]{2})?$/" />', width: "130px" // ,aggregates: ["sum"], footertemplate: "total amount: #=sum#" }, { field: "referencenumber", attributes: { "navi-text": "" }, headertemplate: 'reference number', template: '<input ng-keydown="aa(this,$event)" type ="text" class="k-fill text-right aa" ng-model="dataitem.referencenumber" format-number ng-pattern="/^[0-9]+(\.[0-9]{2})?$/" />', width: "130px" } //, //{ // field: "rowindex", // attributes: { // "navi-text": "" // }, // headertemplate: 'rowindex', // template: '<input ng-keydown="aa(this,$event)" type ="text" class="k-fill text-right aa" ng-model="dataitem.rowindex" format-number ng-pattern="/^[0-9]+(\.[0-9]{2})?$/" />', // width: "130px" //} ]; configaddpaymentsenter.scrollable = true; configaddpaymentsenter.datasource = new kendo.data.datasource({ data: [s1], //group: { // field: "connectionreference", aggregates: [ // { field: "connectionreference", aggregate: "count" }, // { field: "amount", aggregate: "sum" } // ] //}, //aggregate: [{ field: "connectionreference", aggregate: "count" }, // { field: "amount", aggregate: "sum" }], schema: { model: { id: "id", fields: { 'connectionreference': { editable: true, type: "number" }, 'contractnumber': { editable: true, type: "number" }, 'amount': { editable: true, type: "number" }, 'referencenumber': { editable: true, type: "number" } //, // 'rowindex': { editable: false, type: "number" } } } }, pagesize: 5000, }); $scope.dggridaddpaymentsenter = new datagrid(); $scope.dggridaddpaymentsenter.options(configaddpaymentsenter); $scope.init = function (arg) { $scope.dggridaddpaymentsenter.init(arg); }; $scope.init = function (arg) { $scope.dggridaddpaymentsenter.init(arg); };
this 'how to' example helpful: http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/editing/add-row-when-tabbed-out-of-last-row
Comments
Post a Comment