[#407] support for row reordering in grid

This commit is contained in:
aliounedia
2014-04-28 18:48:32 +02:00
parent 7c01e628ba
commit 50b8ab46e0
2 changed files with 13 additions and 13 deletions

View File

@@ -77,12 +77,12 @@ var createExplorer = function(dataset, state) {
state: { state: {
gridOptions: { gridOptions: {
editable: true, editable: true,
// Enable support for row add // Enable support for row add
enabledAddRow: true, enabledAddRow: true,
// Enable support for row delete // Enable support for row delete
enabledDelRow: true, enabledDelRow: true,
// Enable support for row Reoder // Enable support for row Reoder
enableReOrderRow:true, enableReOrderRow:true,
autoEdit: false, autoEdit: false,
enableCellNavigation: true enableCellNavigation: true
}, },

View File

@@ -155,15 +155,15 @@ my.SlickGrid = Backbone.View.extend({
} }
} }
}; };
//Add row delete support, check if enabledDelRow is set to true , by //Add row delete support, check if enableReOrderRow is set to true , by
//default it is set to false //default it is set to false
// state: { // state: {
// gridOptions: { // gridOptions: {
// enabledDelRow: true, // enableReOrderRow: true,
// }, // },
if(this.state.get("gridOptions") if(this.state.get("gridOptions")
&& this.state.get("gridOptions").enabledDelRow != undefined && this.state.get("gridOptions").enableReOrderRow != undefined
&& this.state.get("gridOptions").enabledDelRow == true ){ && this.state.get("gridOptions").enableReOrderRow == true ){
columns.push({ columns.push({
id: "#", id: "#",
name: "", name: "",
@@ -174,15 +174,15 @@ my.SlickGrid = Backbone.View.extend({
cssClass: "recline-cell-reorder" cssClass: "recline-cell-reorder"
}) })
} }
//Add row delete support, check if enableReOrderRow is set to true , by //Add row delete support, check if enabledDelRow is set to true , by
//default it is set to false //default it is set to false
// state: { // state: {
// gridOptions: { // gridOptions: {
// enableReOrderRow: true, // enabledDelRow: true,
// }, // },
if(this.state.get("gridOptions") if(this.state.get("gridOptions")
&& this.state.get("gridOptions").enableReOrderRow != undefined && this.state.get("gridOptions").enabledDelRow != undefined
&& this.state.get("gridOptions").enableReOrderRow == true ){ && this.state.get("gridOptions").enabledDelRow == true ){
columns.push({ columns.push({
id: 'del', id: 'del',
name: '', name: '',