var grid;
var data = [];
var columns = [{
id: "policynumber",
name: "Policy Number",
field: "Policy Number",
width: 100
}, {
id: "issuedate",
name: "Issue Date",
field: "issuedate"
}, {
id: "insuredname",
name: "Insured Name",
field: "insuredname",
width: 100
}, {
id: "policystatus",
name: "Policy Status",
field: "policystatus"
}, {
id: "policytype",
name: "Policy Type",
field: "policytype",
width: 120
}, {
id: "requestdate",
name: "Request Date",
field: "requestdate"
}, {
id: "denialreason",
name: "Reason For Denial",
field: "denialreason",
width: 200,
editor: Slick.Editors.Text
},
{
id: "newgrid",
name: "newgrid",
field: "newgrid",
width: 80,
sortable: true,
formatter: reportFormatter
}
];
var checkboxApprove = new Slick.CheckboxSelectColumn({
cssClass: "slick-cell-checkboxsel"
});
columns.push(checkboxApprove.getColumnDefinition());
var options = {
editable: true,
enableAddRow: true,
enableCellNavigation: true,
asyncEditorLoading: false,
autoEdit: false,
headerRowHeight: 60
};
function reportFormatter(row, cell, value, columnDef, dataContext) {
return "<button class='show-report'>details</button>";
}
$(function () {
for (var i = 0; i < 10; i++) {
var d = (data[i] = {});}
function FormulaEditor(args) {
var _self = this;
var _editor = new Slick.Editors.Text(args);
var _selector;
$.extend(this, _editor);
function init() {
// register a plugin to select a range and append it to the textbox
// since events are fired in reverse order (most recently added are executed first),
// this will override other plugins like moverows or selection model and will
// not require the grid to not be in the edit mode
_selector = new Slick.CellRangeSelector();
_selector.onCellRangeSelected.subscribe(_self.handleCellRangeSelected);
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.