@(Html.Kendo().DatePicker() .Name("DateForReport") .Value(DateTime.Now) .Events(e => { e.Change("getStockInfo"); }) )@(Html.Kendo().Grid<Supermarket.Main.Areas.Management.Models.ProductInStockViewModel>() .Name("reportsByDateGrid") .Columns(columns => { columns.Bound(m => m.ProductName); columns.Bound(m => m.CategoryName); columns.Bound(m => m.Amount); columns.Bound(m => m.PricePerUnit); columns.Bound(m => m.TotalPrice); }) .Pageable() .Sortable())function getStockInfo() { if (this.value() != null) { var date = kendo.toString(this.value(), 'd'); $.ajax({ type: "get", dataType: "json", url: "@Url.Action("GetAvailabilitiesByDate")", data: { date: date }, traditional: true, success: function (result) { if (result.success) { var data = result.data; var newDataSource = new kendo.data.DataSource({ data: data, pageSize: 15, schema: { model: { fields: { ProductName: { type: "string" }, CategoryName: { type: "string" }, Amount: { type: "number" }, PricePerUnit: { type: "number" }, TotalPrice: { type: "number" }, } } } }); var grid = $("#reportsByDateGrid").data("kendoGrid"); grid.setDataSource(newDataSource); grid.refresh(); } else { alert(result.error); } }, error: function () { alert("An error has occurred, please try again or inform an administrator!"); } }); }}{"success":true,"data":[{"ProductName":"Borovec","CategoryName":"Food","Amount":18,"PricePerUnit":1.50,"TotalPrice":27.00},{"ProductName":"Coca-cola","CategoryName":"Beverages","Amount":25,"PricePerUnit":2.50,"TotalPrice":62.50},{"ProductName":"Medenka Lubimka","CategoryName":"Food","Amount":23,"PricePerUnit":1.50,"TotalPrice":34.50}]}@(Html.Kendo().EditorFor(m => m.Body) .Encode(false) .HtmlAttributes(new { style = "width: 740px;height:440px" }) .Tools(tools => tools.Clear().InsertImage()) .ImageBrowser(imageBrowser => imageBrowser .Image("~/Content/Images/{0}") .Read("Read", "ImageBrowser") .Create("Create", "ImageBrowser") .Destroy("Destroy", "ImageBrowser") .Upload("Upload", "ImageBrowser") .Thumbnail("Thumbnail", "ImageBrowser")) )@{ Html.Kendo().Window() .Name("WindowNveBack") .Title("Neuer Kundensatz") .Resizable(resizing => resizing .Enabled(false) //.MinHeight(250) //.MinWidth(250) //.MaxHeight(500) //.MaxWidth(500) ) .Modal(true) .Content(@<text> <div class="pddng_7 lft"> <div class="kd_adr_left_sdgerf"> <ul> <li class="mrgn_bttm_4 li_kd_adr_left_sdgerf">Kd.Nr. / Index</li> <li class="mrgn_bttm_4 li_kd_adr_left_sdgerf">Name</li> <li class="mrgn_bttm_4 li_kd_adr_left_sdgerf">Land / PLZ / Ort</li> <li class="li_kd_adr_left_sdgerf"></li> </ul> </div> <div class="lft"> <ul> <li class="li_height_sdgerf mrgn_bttm_4"> <div class="lft">@Html.Kendo().IntegerTextBox().Name("text1")</div> <div class="lft mrgn_left_4">@Html.Kendo().IntegerTextBox().Name("text2")</div> <div class="lft mrgn_left_4"></div> <div class="clear"></div> </li> </ul> </div> <div class="clear"></div> </div> </text>) //.Width(593) //.Height(300) .Visible(false) .Draggable(true).Render();}Step 1: Expand a parent node, child nodes will be loaded
Step2: Check the parent node, all the child nodes will be checked
Step 3: Now Collapse the parent node (Keep it checked) and expand again to load the child nodes.
Expect:
Child nodes should be checked
Actual:
Child Nodes are not checked
The checkboxes state is not maintained after collapsing a parent node and then expanding the same.
This is one of the critical functionalities in our application.
Please help.
@(Html.TextArea("Name", new{style="width:200px;height:30px;",row="2",cols="30"})
I placed this at the top of the Name field in the ViewModel:
[UIHint("SponsorNameMultilineText")]
I am now seeing a text box but it has too many lines in it - I want it to be shorter. How do I do that?
@(Html.Kendo().Grid(Model.CVXElements) // Specify the type of the grid.Name("Grid").Columns(columns =>{ columns.Bound(p => p.ElementSeqNo).Title("Element ID").Width("100px").ClientTemplate( Html.ActionLink("#= ElementSeqNo #", "PUSH", "ElementBuilder", new {url = "~/PagCC/EB_ElementAddEdit.aspx", ID = "#= ElementSeqNo #", cvxCode = Model.CVXCode }, null).ToString()); columns.Bound(p => p.ElementName).Width("900px"); columns.Bound(p => p.ElementStatus).Width("100px"); columns.Bound(p => p.ElementActive).Title("Live").Width("100px"); columns.Bound(p => p.ParentElement).HtmlAttributes( new {@style= "display:none"}).HeaderHtmlAttributes(new { @style= "display:none;" }); }).ClientDetailTemplateId("ParentElementTemplate").Events(events => events.DataBound("dataBound")).DataSource(dataSource => dataSource.Ajax()).Events(events => events.DataBound("dataBound"))<script id="ParentElementTemplate" type="text/kendo-tmpl"> @(Html.Kendo().Grid<ElementBuilder.Models.Elements>(Model.CVXElementParents) .Name("ParentGrid") .Columns(columns => { columns.Bound(p => p.ElementSeqNo).Title("Element ID").Width("91px") .ClientTemplate( Html.ActionLink("#= ElementSeqNo #", "PUSH", "ElementBuilder", new {url = "~/PagCC/EB_ElementAddEdit.aspx", ID = "#= ElementSeqNo #" }, null).ToString()); columns.Bound(p => p.ElementName).Width("910px"); columns.Bound(p => p.ElementStatus).Width("100px"); columns.Bound(p => p.ElementActive).Title("Live").Width("88px"); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("HierarchyBinding_ParentElements", "ElementBuilder", new { iElemSeqNo = "#=ElementSeqNo#" })) ) .ToClientTemplate() )</script>