我有一个带有列month(integer)的表.在本专栏中,我存储的值如下1, 2, .. 12.
但我必须显示月份名称.
例如:如果值是1我需要显示jan.
我有一张桌子.表名是员工.我用下面的查询.
delete department,name,bloodgroup from employee where employeeid=2;
Run Code Online (Sandbox Code Playgroud)
但我无法单独删除此记录.它显示错误.而且我不想使用update语句.
我是ng-grid的新手.我正在学习带有编辑模板选项的ng-grid.我创建了带有编辑复选框选项的网格.但我不知道如何在编辑复选框后获得该网格中的值?谢谢.
在这里 JSfiddle.
var myapp = angular.module('myapp', ["ui", "ngGrid"]);
myapp.controller('myctrl', function($scope, $http) {
$scope.testInfo= "TestInfo";
$scope.data = {
persons: [],
selected:[],
load: function () {
$http.get("/echo/json/").success(function(data) {
$scope.data.persons = [
{id:1, name:"Max", number:51323.512,value:'on'},
{id:2, name:"Adam", number:7245.2,value:'on'},
{id:3, name:"Betty", number:828,value:'off'},
{id:4, name:"Sara", number:23452.45182,value:'on'}
];
$scope.data.selected[0] = $scope.data.persons[0];
});
}
};
var cellTemplate = "<div ng-class=\"'ngCellText colt' + $index\">"
+ " <span ng-cell-text>{{COL_FIELD}}</span>"
+ "</div>";
var cellEditTemplate = '<input type="checkbox" ng-checked="row.entity.value==\'on\'" ng-input="COL_FIELD" /></div>';
$scope.grid = {
options: {
data: "data.persons",
selectedItems: …Run Code Online (Sandbox Code Playgroud)