2nd Grid is not refreshing.
Here is part of my code:
1st grid:
@(Html.Kendo().Grid<OpenInvoicesInfo>()
.Name("OpenInvoiceGrid")
.Events(e => e.DataBound("LineItems_Databound"))
.ColumnMenu(i => i.Columns(false))
.Columns(columns =>
{
columns.Bound(p => p.INVOICE).ClientTemplate("<input type='checkbox' value='#= INVOICE #' class='testclass' />").Width(4);
columns.Bound(i => i.INVOICE).Title("Invoice").Width(15);
columns.Bound(i => i.ORDER_NBR).Title("Order").Width(10);
...
.Scrollable()
.ToolBar(i => { i.Custom().Text("Get All Invoices Comments").Url("javascript:GetAllInvoicesComments();"); })
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax().UseJniErrorHandler()
.PageSize(8)
.Read(read => read.Action("GetOpenInvoices", "Maint", new { cust = Request.QueryString["cust"] }))
)
2nd grid:
@(Html.Kendo().Grid<CustomerComments>()
.Name("CustomerCommentsGrid")
.AutoBind(false)
.Columns(columns =>
{
columns.Bound(i => i.Invoice).Title("Invoice").Width(15);
columns.Bound(i => i.Comment).Title("Comment").Width(40);
}).Pageable(pageable => pageable
.Refresh(true)
)
.Scrollable()
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax().UseJniErrorHandler()
.PageSize(10)
//.Read(read => read.Action("GetCustomerComments", "Maint", new { invoices = "fail" }))
)
)
<script type="text/javascript">
function GetAllInvoicesComments() {
var result = [];
var items = $("#OpenInvoiceGrid").find(".testclass").filter(":checked");
items.each(function () {
result.push({
Value: $(this).val(),
Checked: true
});
});
var invoicesList = "'";
for (var i = 0; i < result.length; i++) {
invoicesList = invoicesList + result[i].Value.trim() + '\',\'';
}
invoicesList = invoicesList.substring(0, invoicesList.length - 2);
$.ajax({
url: webManager.resolveUrl("~/maint/GetCustomerComments"),
method: "POST",
data: { invoices: invoicesList },
success: function () {
var grid = $('#CustomerCommentsGrid').data('kendoGrid');
grid.dataSource.read();
grid.refresh();
alert('success');
},
error: function () {
alert('an error occurred');
}
});
}
Any help will be appreciated. Waiting for any replies.
Thank you.
Hi.
I have a Grid with a custom command button and when I click it, I want to open a context menu. I created this (http://dojo.telerik.com/@kristjk/UNOwE) which has a Grid, similar to mine, and a custom command button as the last cell in the row.
How would I go about showing a context menu when I click it and not show it on right-click ?
Best regards,
Kalli
I've got a project that's been in development since late last year, with many grids in it, all of which have resizable columns (resizable: true). I dropped in the latest Kendo release that was made available this past week, and now (with no other changes made to the project) none of the grids' columns in my project are resizable. There's nothing in the release notes about this. What's going on with column resizing?

Hi,
I'm migrating an very old kendo's version to the latest and i want to check all my code for make it pretty.
In grid, we need to have some editable fields and other readonly fields. But readonly's fields are computed with the editable.
For example, i have a product's grid with quantity, unit price and total. Unit price and Total, must be readonly, but the user can change quantity. Total is automatically calculated by unit price multiple quantity.
Actually, in our code, iclose cell when enter on edit mode if it's Unit price and quantity. But i seeing in the manual, i can use de Model editable flag. But when i use it, i can't change Total value using "set" method.
https://fiddle.jshell.net/muadhib/c1qLvax2/2/
Any body know how to do that in the prettiest way ?
Thx
Hi there. I'm looking to do some on-the-fly calculations.I want to multiply the values in a Quantity field and times it by a Unit Price field and update the input field that's within the Ext Price field.
I was going to try and do it, in the save event, and I've done that in the past, so when a user would tab off the field, it would do the calculation. But now my editable property is "inline" and not "true" so it appears I can't do that now, the editable mode like this effects the timing of such events.
I want the user to see the updated value as they are tabbing around the row, not when they simply save.
The input fields seem to be kendo numerictextboxes when I'm in edit mode.
Here's my grid part.
01.$("#gridLineItems").kendoGrid({02. dataSource: dataSource,03. navigatable: true,04. pageable: true,05. editable: {06. mode: "inline"07. },08. //editable: true,09. toolbar: [{ name: "create", text: "Insert Line" }, { name: "cancel" }, { name: "save" }],10. columns: [11. { field: "LineItemPK", title: "LineItemPK", hidden: true },12. { field: "Quantity", title: "Qty", validation: { min: 0 }, editor: editorNumberQty, width:50 },13. { field: "UnitPrice", title: "Unit Price", editor: editorNumber, width: 75 },14. { field: "ExtPrice", title: "Ext. Price", editable: false, attributes: { "class": "ExtPrice" }, width: 75 },15. { field: "ProductFK", title: "ProductFK", attributes: { "class": "ProductFK" }, hidden: true },16. { field: "Description", title: "Product", editor: productDropDownEditor, width: 200 },17. { field: "ProductID", title: "Product ID" },18. { field: "UoM", title: "UoM" },19. { field: "InvoiceNum", title: "Invoice #" },20. { field: "DepFunction", title: "Dep. Funct." },21. { field: "CostCenterFK", title: "CostCenterFK", hidden: true },22. { field: "CostCenterDescription", title: "Cost Center", editor: csDropDownEditor },23. { field: "AccountFK", title: "G/L", hidden: true },24. { field: "GLAccount", title: "G/L", editor: glDropDownEditor },25. { field: "OrderFK", title: "OrderFK", editable: false, hidden: true },26. { command: ["edit", "destroy"], title: " ", width: 140 }27. ],28. selectable: true,29. edit: function (e) {30. 41. setTimeout(function () {42. var input = e.container.find("input");43. input.select();44. });45. 46. },47. change: function (e)48. {49. 50. },51. save: function (e) {52. 53. },54. saveChanges: function (e)55. {56. 57. }58. });59. 60. });
Also, I tried the if (e.field == "UnitPrice") business, but that doesn't fire at all, unless I have editalble be inline (which doesn't make sense to me anyways, true or inline both seem to present an inline way of editing, but I digress.). I tried this because I only wanted it to fire it a user was tabbing off of UnitPrice or Quantity. I also tried e.values.Quantity, this doesn't help either, because it only seems to know the value if you are on the field in question. So, if I tab off of Quantity and I'm looking for e.values.Quantity, it gets that, but not the value of UnitPrice.
Thanks in advance.
PS - also, if you look at my line 41, the code that's supposed to focus on a field when I tab into it, it's not firing at all. Again, I think because I'm not in editable mode - true. This whole editablemode seems to be screwing a lot up for me. But I needed to do it because delete wasn't working without it.
We got pushed Chrome Version 50.0.2661.75 m (64-bit) today and ever since then I get this in the console...
VM2478:544 Detected Kendo UI version: "2016.1.217"
VM2478:494 Uncaught ReferenceError: $0 is not defined
If I uninstall the Inspector the error goes away
If I reinstall it comes back
<input type="radio" value="true" name="type" data-bind="checked: createNew" />
<input type="radio" value="false" name="type"" data-bind="checked: createNew" />
I have a dojo with instructions (on the dojo rendered page) on how to reproduce the issue: http://dojo.telerik.com/Afaji/4
If you (1) Group a column in the grid, then (2) manually expand the width of column(s), (3) Run columns thru grid's "autoFitColumn" function....
Expected behavior: All the columns reduce/expand in size to only accommodate the data within (works fine if no column grouping)
Actual behavior: The columns do NOT reduce in size (to only accommodate the data within).

Hi,
I just started to work on this platform last week.
I have created a table and want to add data to it on submit button click.My table name is Doctor. The data is not syncing to table i guess.This is my code .Api key is not mentioned for obvious reason.Also whenever I logout all the changes made in code disappears.I am really new to this platform so please help me out.
app.formView = kendo.observable({
onShow: function() {},
afterShow: function() {}
});
// START_CUSTOM_CODE_formView
// Add custom code here. For more information about custom code, see http://docs.telerik.com/platform/screenbuilder/troubleshooting/how-to-keep-custom-code-changes
// END_CUSTOM_CODE_formView
(function(parent) {
var apiKey="";
var el = new Everlive(apiKey);
var doc=new kendo.data.DataSource({
type: "everlive",
transport: {
typeName: "Doctor"
}
});
var formViewModel = kendo.observable({
fields: {
city: '',
state: '',
address2: '',
address1: '',
},
submit: function() {
var add1=$("#add1").val();
var state=$("#state").val();
var city =$("#city").val();
if(add1=="")
{
$("#adderr").show();
return false;
}
if(state==null){
$("#stateerr").show();
return false;
}
if(city==""){
$("#cityerr").show();
return false;
}
doc.add({
Address1:formViewModel.fields.address1,
City:formViewModel.fields.city,
State:formViewModel.fields.state
});
doc.one("sync",this.close);
doc.sync();
alert("hello");
},
cancel: function() {}
});
parent.set('formViewModel', formViewModel);
})(app.formView);
Thanks,
Rugved
Hi,
I have a Side Menu on my page, which when clicked moves into the page. When the SideMenu moves in, the Gantt Timeline is moving out of the container. It also increases the page width which looks awkward. I tried to work that out using the kendo.resize , but it still remains the same. I am attaching pictures for reference.
Initial.png - Original Display
Final.png - When Side Menu is toggled
Please try to answer in angular code.
Note: I am Using Bootstrap and Angular,
Thanks
