Hello, I am using grid's inline editing mode and I have an external button that modifies some information on the rows. My problem is that after the information has been modified, if I click Edit and then Cancel, the row goes into its original state and I cannot find a way to persist this data. Does anyone know what could be wrong? Here is my code:
This is what my button does:
01.function validateAll() {02. var grid = $("#Grid").data().kendoGrid;03. var orders = grid.dataSource.view();04. 05. for (var i = 0; i < orders.length; ++i) {06. var order = orders[i];07. if (order.Status === 'Open') {08. order.Status = 'Valid'09. }10. }11. grid.refresh();12. }And this is the code of the grid:
01.@Code02. Dim grid = Html.Kendo().Grid(Of Model)()03. With grid04. .Name("Grid")05. .Editable(Sub(edit) edit.Mode(GridEditMode.InLine))06. .Columns(Sub(columns)07. columns.Command(Sub(command)08. command.Edit()09. End Sub)10. columns.Bound(Function(c) c.Order)11. columns.Bound(Function(c) c.Status)12. End Sub)13. .DataSource(Sub(dataSource)14. Dim dataSourceBuilder = dataSource.Ajax()15. With dataSourceBuilder16. .Read("GetGridData", "Order")17. .Update("DummySave", "Order")18. .Batch(True)19. .ServerOperation(False)20. .Model(Sub(model)21. model.Id(Function(row) row.Order)22. End Sub)23. End With24. End Sub)25. End With26.End CodeHi,
I'm using the change event, so after I change any cell in the grid I'm getting to this event.
How can I know which cell I changed?
Thanks,
Yael
$scope.relatedCasesOptions = { dataSource: new kendo.data.DataSource({ type: 'json', transport: { read: function (opt) { if ($scope.item) opt.success([{ CaseNumber: "CaseNumber" }]); opt.success([]); } }, columns: [ { field: "CaseNumber", title: "№ дела"} ] }
In other place, when particular event get rose, I call
var cases = $('#docRelatedCaseGrid').data("kendoGrid");cases.dataSource.read();cases.refresh();There set breakpoint on opt.success([{ CaseNumber: "CaseNumber" }]) row and it's possible to observe that read function was really called.
But table are not refreshed and grid still remains empty.
Dear Support team,
We are using Kendo UI grid in our application, which require the functionality to select the multiple cells in a particular column by holding the shift button.
For e.g. click on first row in a particular cell, hold the Shift then click on the different cell in same column in last row to select all the cells in that range.
Please let us know, if that option is available for the selection of multiple cells vertically in a particular column using Shift key,
Thanks
Hey
My Application stores record according to the timezone of the user. That part, being said is walk over. Problem is when I were to display them in a column in Grid. Values stored in the columns are according to the timezone, but when retrieved and displayed in grid, it probably converts it to timezone of the system. One work-around on the internet is to display the column by converting it in string. That seems to do the trick, but on the downside, i cannot filter the column. Is there a better way to handle the issue?
Abdul Rehman
Hi,
Here is a multiselect which I want to change its value on the change event. It pre-select three options, when mouse click the dropdown and pick an extra one, it will reset it back to two options. Now click the dropdown, use autocomplete (key in E which shows option EEE) to choose an extra option, the multiselect become empty. Please see the file attached. How to rebind it with autocomplete?
<select kendo-multi-select="productSelect" k-options="selectOptions" ng-model="selectedIds"
k-on-change="isChanging(kendoEvent)"
></select>
<button data-kendo-button data-ng-click="reset()">Reset</button>
$scope.selectOptions = {
placeholder: "Select products...",
dataTextField: "ProductName",
dataValueField: "ProductID",
valuePrimitive: true,
autoBind: false,
dataSource: {
data: [
{ ProductName: "AAA", ProductID: 1 },
{ ProductName: "BBB", ProductID: 2 },
{ ProductName: "CCC", ProductID: 3 },
{ ProductName: "DDD", ProductID: 4 },
{ ProductName: "EEE", ProductID: 5 }
]
}
};
$scope.selectedIds = [ 1, 2, 3 ];
$scope.reset = function(){
$scope.selectedIds = [ 1, 2, 3 ];
}
$scope.isChanging = function(kendoEvent){
$scope.selectedIds = [ 3, 5 ];
}
Thanks,
Lisa