Skip to content

Commit e9508b7

Browse files
Integrated latest changes at 10-31-2025 1:30:24 PM
1 parent 8356403 commit e9508b7

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

ej2-javascript/code-snippet/grid/filter-menu-cs1/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ej.grids.Grid.Inject(ej.grids.Filter);
2+
3+
var filterParams = { params: { format: 'M/d/y HH:mm', } };
24
var grid = new ej.grids.Grid({
35
dataSource: data,
46
allowPaging: true,
@@ -8,8 +10,8 @@ var grid = new ej.grids.Grid({
810
filterSettings: { type: 'Menu' },
911
columns: [
1012
{ field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right' },
11-
{ field: 'OrderDate', headerText: 'Order Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm', textAlign: 'Right' },
12-
{ field: 'ShippedDate', headerText: 'Shipped Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm', textAlign: 'Right' },
13+
{ field: 'OrderDate', headerText: 'Order Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm',filter: filterParams, textAlign: 'Right' },
14+
{ field: 'ShippedDate', headerText: 'Shipped Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm',filter: filterParams, textAlign: 'Right' },
1315
{ field: 'ShipCountry', headerText: 'Ship Country', width: 150 }
1416
],
1517
actionComplete: actionComplete

ej2-javascript/code-snippet/grid/filter-menu-cs1/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { data } from './datasource.ts';
33

44
Grid.Inject(Filter, Page);
55

6+
let filterParams = { params: { format: 'M/d/y HH:mm' } };
67
let grid: Grid = new Grid({
78
dataSource: data,
89
allowPaging: true,
@@ -12,8 +13,8 @@ let grid: Grid = new Grid({
1213
filterSettings: { type: 'Menu' },
1314
columns: [
1415
{ field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right' },
15-
{ field: 'OrderDate', headerText: 'Order Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm', textAlign: 'Right' },
16-
{ field: 'ShippedDate', headerText: 'Shipped Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm', textAlign: 'Right' },
16+
{ field: 'OrderDate', headerText: 'Order Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm',filter: filterParams, textAlign: 'Right' },
17+
{ field: 'ShippedDate', headerText: 'Shipped Date', width: 180, type: 'datetime', format: 'M/d/y HH:mm',filter: filterParams, textAlign: 'Right' },
1718
{ field: 'ShipCountry', headerText: 'Ship Country', width: 150 }
1819
],
1920
actionComplete: actionComplete

ej2-javascript/code-snippet/grid/grid-cs39/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function queryCellInfo(args) {
2323
checked: args.data.Verified,
2424
change: function (changeArgs) {
2525
args.data.Verified = changeArgs.checked;
26-
grid.updateRow(args.data.OrderID, args.data);
26+
var rowIndex = grid.getRowIndexByPrimaryKey(args.data.OrderID);
27+
grid.updateRow(rowIndex, args.data);
2728
},
2829
});
2930
checkbox.appendTo(args.cell.querySelector('input'));

ej2-javascript/code-snippet/grid/grid-cs39/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function queryCellInfo(args: QueryCellInfoEventArgs) {
2727
checked: (args.data as any).Verified,
2828
change: function (changeArgs: ChangeEventArgs) {
2929
(args.data as any).Verified = changeArgs.checked;
30-
grid.updateRow((args.data as any).OrderID, args.data);
30+
let rowIndex = grid.getRowIndexByPrimaryKey(args.data.OrderID);
31+
grid.updateRow(rowIndex, args.data);
3132
},
3233
});
3334
checkbox.appendTo(args.cell.querySelector('input'));

ej2-javascript/code-snippet/grid/resize-grid-dimension-cs1/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ grid.appendTo('#Grid');
1313
var widthsize = new ej.inputs.NumericTextBox({
1414
min : 400,
1515
max : 650,
16-
placeholder : 400,
16+
placeholder : '400',
1717
step : 5,
1818
width : 120
1919
});
@@ -22,7 +22,7 @@ widthsize.appendTo('#WidthTextBox');
2222
var heightsize = new ej.inputs.NumericTextBox({
2323
min : 200,
2424
max : 650,
25-
placeholder : 200,
25+
placeholder : '200',
2626
step : 5,
2727
width : 120
2828
});

ej2-javascript/code-snippet/grid/resize-grid-dimension-cs1/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ grid.appendTo('#Grid');
1818
let widthsize: NumericTextBox = new NumericTextBox({
1919
min : 400,
2020
max : 650,
21-
placeholder : 400,
21+
placeholder : '400',
2222
step : 5,
2323
width : 120
2424
});
@@ -27,7 +27,7 @@ widthsize.appendTo('#WidthTextBox');
2727
let heightsize: NumericTextBox = new NumericTextBox({
2828
min : 200,
2929
max : 650,
30-
placeholder : 200,
30+
placeholder : '200',
3131
step : 5,
3232
width : 120
3333
});

0 commit comments

Comments
 (0)