File tree 4 files changed +643
-194
lines changed
selection-column-existing
selection-column-multiple-method
4 files changed +643
-194
lines changed Original file line number Diff line number Diff line change 8
8
<div style =" padding : 20px 0px 0px 0px " >
9
9
<ejs-grid ref =" grid" :dataSource =" data" :selectionSettings =" selectionOptions" >
10
10
<e-columns >
11
- <e-column field =" OrderID" headerText =" Order ID" textAlign =" Right"
11
+ <e-column field =" OrderID" headerText =" Order ID" textAlign =" Right"
12
12
width =" 120" ></e-column >
13
13
<e-column field =" CustomerID" headerText =" Customer ID" width =" 120" >
14
14
</e-column >
@@ -29,11 +29,11 @@ import { data } from "./datasource.js";
29
29
import { ref } from " vue" ;
30
30
const textbox = ref (null );
31
31
const grid = ref (null );
32
- const selectionOptions = { type : " Multiple " , mode: " Cell" };
32
+ const selectionOptions = { allowColumnSelection : true , mode: " Cell" };
33
33
const onClick = function () {
34
- const startIndex = parseInt (textbox .value .value , 10 );
34
+ const startIndex = parseInt (textbox .value .ej2Instances . value , 10 );
35
35
if (! isNaN (startIndex))
36
- grid .value .selectColumnWithExisting (startIndex);
36
+ grid .value .ej2Instances . selectionModule . selectColumnWithExisting (startIndex);
37
37
};
38
38
</script >
39
39
<style >
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ import { ButtonComponent as EjsButton } from "@syncfusion/ej2-vue-buttons";
51
51
import { data } from " ./datasource.js" ;
52
52
import { ref } from " vue" ;
53
53
const grid = ref (null );
54
- const selectionOptions = { type: " Multiple" , mode: " Cell" };
54
+ const selectionOptions = { allowColumnSelection : true , type: " Multiple" , mode: " Cell" };
55
55
const selectColumns = function (columns ) {
56
56
grid .value .ej2Instances .selectionModule .clearColumnSelection ();
57
57
grid .value .ej2Instances .selectionModule .selectColumns (columns);
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ import { ref } from 'vue';
37
37
const textbox = ref (null );
38
38
const textbox1 = ref (null );
39
39
const grid = ref (null );
40
- const selectionOptions = { type: ' Multiple' , mode: ' Cell' };
40
+ const selectionOptions = { allowColumnSelection : true , type: ' Multiple' , mode: ' Cell' };
41
41
const onClick = function () {
42
- const startIndex = parseInt (textbox .$el .value , 10 );
43
- const endIndex = parseInt (textbox1 .$el .value , 10 );
42
+ const startIndex = parseInt (textbox .value . ej2Instances .value , 10 );
43
+ const endIndex = parseInt (textbox1 .value . ej2Instances .value , 10 );
44
44
grid .value .ej2Instances .selectionModule .selectColumnsByRange (startIndex, endIndex);
45
45
};
46
46
</script >
You can’t perform that action at this time.
0 commit comments