Hi,
I need help on how to achieve the Master and Detail using Grid and Chart in 1.png.
And when user click on the row, it will show the detail records like in 2.png.
Any way to achieve this?
How can i define the date format whicht should be send to a remote server, when using a Date(Time)Picker as filterable ui in column definition?
Does the treelist/grid support data-bind on the attrubite data-columns?
<div id="treelist" data-role="treelist"
data-selectable="single"
data-reorderable="false"
data-resizable="true"
data-sortable="true"
data-filterable="true"
data-column-menu="true"
data-columns="[
{ 'field': 'F0', 'title': 'LEGAL NAME', 'width': 250, 'locked': true },
{ 'field': 'F1', 'title': 'TIN', 'width': 200 },
{ 'field': 'F2', 'title': 'ASSUMED EFFECTIVE INCENTIVE %', 'width': 200 },
{ 'field': 'F3', 'title': 'INTEREST', 'width': 200, 'headerAttributes': { 'style': 'background-color:#D3747F;' }, 'format': '{0:c2}' }
]"
data-bind="source: data">
</div>
I do not want do display aggregate values(rows/ columns) for certain measures. Is there a way to achieve this?
I have a Kendo().Grid<>() that uses a MVC EditorTemplate to PopUp and allow the fields to be changed. When I type in the editor template all is well. However, if I update the field using .set('Field', 'Value') on a field that has the [Required] attribute set in C#, the set does not update the value.
Here is the ViewModel object definition:
public class SampleVM{ public int Id { get; set; } [Required] public string Foo { get; set; } public string Bar { get; set; }}Here is my Grid definition:
@(Html.Kendo().Grid<SampleVM>() .Name("cSampleGrid") .DataSource(ds => ds .Ajax() .Read(r => r.Action("IndexList", "Home")) .Create(c => c.Action("CreateIndex", "Home")) .Model(m => { m.Id(f => f.Id); } ) ) .ToolBar(t => t.Create().Text("Create Index")) .Editable(e => e.Mode(GridEditMode.PopUp)) .Events(e => e.Edit("OnEditSample")))@section Scripts {<script> function OnEditSample(pEvent) { var editDiv = pEvent.container; var editWindow = pEvent.container.data('kendoWindow'); var editable = pEvent.model; if (editable.ContactID == 0) editWindow.title = 'Create Index'; else editWindow.title = 'Edit Index'; editWindow.editable = editable; $('#cFillButton', pEvent.container).click(function (pEvent) { editWindow.editable.set('Foo', 'Foo'); editWindow.editable.set('Bar', 'Bar'); }); }</script>}Here is my editor template:
@model KendoRequiredBug.Models.SampleVM @Html.AntiForgeryToken() @Html.ValidationSummary(true, "", new { @class = "text-danger" }) <div class="field-label"> @Html.LabelFor(model => model.Foo, htmlAttributes: new { @class = "control-label col-md-2" }) </div> <div class="field-editor"> @Html.EditorFor(model => model.Foo, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.Foo, "", new { @class = "text-danger" }) </div> <div class="field-label"> @Html.LabelFor(model => model.Bar, htmlAttributes: new { @class = "control-label col-md-2" }) </div> <div class="field-editor"> @Html.EditorFor(model => model.Bar, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.Bar, "", new { @class = "text-danger" }) </div><div style="clear:both"></div><div><a id="cFillButton" class="k-button">Fill</a></div>When the Fill button is clicked, the Bar field is set properly, however the Foo field is left blank and the "Required field" error message is shown. If I remove the [Required] attribute from 'Foo', then both fields update as expected. I am using Kendo 2015.1.429.
Can anyone explain what is going on?
Hey,
Having a very peculiar problem with the scheduler I have created. It works perfectly in all browsers except IE.
While loaded in IE the move/create events do not update the scheduler until after a page reload.
The strange part is that if you have the debug console open in IE the problem resolves itself and no errors are fired.
Any help would be greatly appreciated - I've completely ran out of ideas.
Cheers,
<div id="divMaster"> Kendo Menu Here With clicks to fill content... <div id="divContent"></div></div><script>
$(document).ready(function () {
kendo.bind(divMaster, app.masterService.viewModel);
}</script>function clickAbout() { $('#divContent').load('/Content/About.html #about'); location.hash = "#about";}function clickHome() { $('#divContent').load('/Content/Home.html #home'); location.hash = "#home";<script src="/scripts/home.viewmodel.js"></script><script> $(document).ready(function () { var divHome = $("#divHome"); kendo.bind(divHome, app.homeService.viewModel); });</script><div id="divHome"> Home Page <br /> <input id="txtHomelbl" data-bind="value: testText" /></div>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 Code