Hello,
I've got a grid with a client template set but everytime I click to expand the details row, the details collapse immediately. I don't know what is causing it. Here's my grid implemention.
@(Html.Kendo().Grid<AWP.UI.ViewModel.UIdto.Manufacturer>()
.Name("Manufacturers")
.Columns(columns =>
{
columns.Command(command =>
{
command.Edit();
});
columns.Bound(c => c.RecordState).Title("Active").ClientTemplate("<input type='checkbox' #= RecordState ? checked='checked' :'' # disabled />");
columns.Bound(c => c.DisplayValue).Title("Display Value");
columns.Bound(c => c.DisplayCode).Title("Display Code");
columns.Bound(c => c.DisplayOrder).Title("Display Order");
columns.Bound(c => c.InterfaceCode).Title("Interface Code");
columns.Template(c => null).ClientTemplate("#if(RecordState==0){#<button class='k-button k-button-icontext' onClick='Activate(\"#=ManufacturerId#\")'>Activate</button>#}else{#<button class='k-button k-button-icontext' onClick='Deactivate(\"#=ManufacturerId#\")'>Deactivate</button>#}#");
})
.ToolBar(toolbar =>
{
toolbar.Template(@<text>
<div class="toolbar">
<div class="row">
<div class="col-md-4">
<div class="input-group">
<input type="text" class="form-control k-textbox" id='FieldFilter' placeholder="Search for...">
</div>
</div>
</div>
</div>
</text>);
})
.ClientDetailTemplateId("mytemplate")
.AutoBind(true)
.Scrollable()
.Resizable(resizing => resizing.Columns(true))
.Sortable(sorting => sorting.Enabled(true))
.Reorderable(reorder => reorder.Columns(true))
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable(pageable => pageable
.Input(true)
.Numeric(false)
)
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.ManufacturerId);
model.Field(p => p.ManufacturerId).Editable(false);
model.Field(p => p.RecordState).Editable(false);
})
.PageSize(20)
.Read("Read", "Manufacturer")
.Update("Update", "Manufacturer")
)
.Events(events => events
.DetailInit("detailExpand")
)
)
My template is simple:
<script id="mytemplate" type="text/x-kendo-template">
<div>
This is my details view #: DisplayValue #
</div>
</script>
My detailExpand method only contains a debugger. I can catch the expansion only when debugging. Without debugging, the expansion is invisible. I've tried programmatically expanding the row but the row always collapses after i call expandRow().
var grid = $("#Manufacturers").data("kendoGrid");
expandedRowUid = e.masterRow.data('uid');
grid.expandRow($('tr[data-uid=' + expandedRowUid + ']'));
Why is this happening?
Hello,
I am using a TreeList to allow users to configure a Question and Answer tree. The user needs to be able to add a question row, then a list of potential answers (these are multiple choice questions) and then under each answer add a follow up question that should be asked in the event that that answer is selected.
Ideally, when a user creates a new question row, he would be presented with 3 or 4 editable rows - the top one intended to be the text of the question and then the additional rows to supply the answer choices for that question so that he can add questions AND answers with just one operation. So my first question is whether this is possible at all in TreeList (my attempts to call addRow() multiple times have not been successful).
If giving the user multiple editable rows all at once is not an option, then the second-best thing would be to automatically create some "default" answers in the database (I am using a remote datasource with this TreeList) and then upon the Create operation completing, show the new question they've added to the list as well as the two default answer rows below it. I have attempted this as well - when the transport Create operation is called, 3 new records are created in the database (the latter two records having a "parent" value of the ID of the first one), and I am returning JSON containing all 3 rows. The new question row then shows on the TreeList, but the new answers do not get added. I can collapse and re-expand the tree, but they still do not show up until I refresh the page and the TreeList loads from scratch again. So my second question is is it possible to have one transport create operation add multiple rows to the tree and have them be displayed immediately upon completion of the operation.
Thank you.
Hello,
I'm building a dynamic grid (Datasource Model,Columns are built as js objects),my issue is :
I've a column bound to a numeric field and displayed as a checkbox using as per the following code
fields["Fields[" + f + "].Value"] = { type: "number", editable: false, defaultValue: 0 };<br>Columns[i] = { field: "Fields[" + f + "].Value", title: gridModel.Fields[f].FieldName, template: "<input id='checkbox" + f + "' type='checkbox' #=(Fields[" + f + "].Value > 0 ) ? checked='checked' :'' # #=(Fields[" + f + "].ReadOnly > 0 ) ? disabled='disabled' :'' # class='chkbx' />", width: w, editable: false, attributes: { style: "text-align:center;" }, headerAttributes: { style: "text-align:center;", title: gridModel.Fields[f].Details }, footerAttributes: { style: "text-align:center;" }, aggregates: fAggregate, footerTemplate: footerTemplate, groupFooterTemplate: grpFooterTemplateFn };
It performs just fine, the problem takes place when i do datasource filtering, the field value is assumed to be a string and therefore an internal javascript exception occurs in the part below
(function anonymous(d, __f, __o) {return (((d.Fields[1].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[2].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[3].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[4].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[5].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[7].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[8].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[9].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[10].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[11].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[12].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[13].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[18].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[19].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[20].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[21].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[22].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[23].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[24].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[26].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[27].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[28].FieldText || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[29].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[30].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[31].Value || '').toLowerCase().indexOf("mads") >= 0 || (d.Fields[32].Value || '').toLowerCase().indexOf("mads") >= 0))})
if i remove the template from the column definition (it displays 0 and 1) no exception happens, any suggestions
Regards,
MOTASH
Hi,
In this dojo it can bee seen that the default culture is not applied to the headers unless an override is applied. After switching cultures to GB I thought the default 'd' would show as day/month instead of month/day. However I had to override its header to apply 'd'. Is this a little bug?
https://dojo.telerik.com/@mattpil29/iFUlIFuP
Note this dojo has (what I think) useful examples of modifying the culture pattern and showing that for views you can set multiple headers:
Week - week & day headers
Month - month & week headers
Year - year & month headers
Something that wasn't clear at first.
Matt
$.ajax({ url: "http://someserver:8554/search", type: 'POST', beforeSend: function(req) { req.setRequestHeader('Authorization', auth); }, success: function(data) { log(data); } });
Hello everybody.
I have an interface with a tree of kendo grids made with detail grids. These grids are built dinamically depending on how many levels the loaded data has. The data comes from outside the grid, so it is set manually. Everything ok until here. The thing is that I need all the detail grids rendered at the load of the interface, so I did a routine which expands and collapses all details only to make sure they (their html in DOM)are all generated. But this routine becomes slow and sometimes freezes the tab for a few seconds while executing if the data is somewhat big. What I want to ask is if there is any other way to do that with more performance than the way I did. Here is the demo: http://dojo.telerik.com/@marcio/OKiPARAb.
The routine is as below:
let generateDetailAllLevelsRecursive = function generateDetailAllLevelsRecursive($grid) { let grid = $grid.data("kendoGrid"); $grid.find(".k-master-row").each(function() { let $row = $(this); grid.expandRow($row); generateDetailAllLevelsRecursive($row.next(".k-detail-row").find(".k-grid")); grid.collapseRow($row); }); };
Thanks in advance.

hi,
I'm trying create a scheduler which is both compatible in mobile and desktop. The issue I'm facing is when I try it in mobile view the full content doesn't show up .
Is it something I have done css or I have to provide height explicitly other than auto height?
Hi,
So (obviously) I've recently updated my KendoUI For jQuery library to the latest version, 2018.1.221. The update has introduced a bug into my code however. In the Release History for Kendo UI R1 2018 SP1 (https://www.telerik.com/support/whats-new/kendo-ui/release-history/kendo-ui-r1-2018-sp1) and it lists the following statement as a bug fix for the Button widget:
"Button keeps active state if pressing Enter to trigger click and changing focus inside click event handler"
A particular feature in my project makes use of setting the state of a kendo button to active to create the equivalent of a "button checkbox". Except now, once i click away from the button I just made active, its active state is removed.
I've created a Dojo example (https://dojo.telerik.com/AKUdABat) which uses the previous kendoUI release to demo what I want to do. Using the 2 version there, click the primary button and note that both buttons are set as active, then click in any white space. In the new release, the primary button's active state is removed, and im confident its due to the button widget fix I previously mentioned.
Please advise on how i can prevent this from happening, or another way of setting the active state of a clicked button without it being reverted.
Thanks in advance,
Grant

Hi,
I have a Gantt in a bootstrap tab control (not selected on page load). The Gantt was failing to render when the tab was displayed. So I added resize\refresh calls after the tab is displayed. The same technique is used in this fiddle: http://dojo.telerik.com/@mattpil29/IXoGOpIm
However the left panel displaying the task names is always collapsed\zero width. How do we make sure this panel shows all columns when first displayed?
Thanks, Matt
Bonus point question: I do not want a vertical scroll bar in the Gantt chart, instead I want its height to expand as the tree on the left is expanded - the user will scroll my whole page. I can't see a 'auto' height option. Can this be achieved?
