Telerik Forums
Kendo UI for jQuery Forum
1 answer
209 views

I am using TreeList to edit hierarchical data.  I have to use Custom Edit template to create/edit rows. But new row disappears after clicking on Update button in Popup window.  I have to refresh page to see new rows. What am I doing wrong? 

@(Html.Kendo().TreeList<Models.FlowItemModel>()
    .Name("treelist")
    .Toolbar(toolbar => toolbar.Create())
    .Columns(columns =>
    {
        columns.Add().Field(e => e.FieldType).Width(200).Title("Type");
        columns.Add().Field(e => e.FieldLabel);
        columns.Add().Field(f => f.LineNumber).Width(100).Title("#");
        columns.Add().Field(e => e.DropdownValues).Width(150).Title("DropDown");
        columns.Add().Width(350).Command(c =>
        {
            c.CreateChild().Text("Add child");
            c.Edit();
            c.Destroy();
        });
    })
    .Editable(editable => editable.Move(move => move.Reorderable(true)))
    .Editable(e => e.Mode("popup").TemplateName("CustomTreeListPopup"))
    .Filterable()
    .Sortable()
    .DataSource(dataSource => dataSource
        .Create(create => create.Action("CreateFlowItem", "Configurator").Data("getConfiguration"))
        .Read(read => read.Action("GetFlowItems", "Configurator").Data("getSelectedFlowItem"))
        .Update(update => update.Action("UpdateFlowItem", "Configurator").Data("getConfiguration"))
        .Destroy(delete => delete.Action("DeleteFlowItem", "Configurator"))
        .Model(m =>
        {
            m.Id(f => f.Id);
            m.ParentId(f => f.ParentId).Nullable(true);
            m.Field(f => f.LineNumber);
            m.Field(f => f.FieldLabel);
            m.Field(f => f.FieldType);
        })
    )
    .Events(events =>
     {
         events.DragEnd("onDragEnd");
     })
)

CustomTreeListPopup:

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI
@model Web.Models.FlowItemModel

<div class="k-edit-form-container">
    <h5>Flow Item</h5>
    <br />
    @Html.HiddenFor(model => model.Id, new { @id = "edit_Id", @Name = "edit_Id" })
    @Html.HiddenFor(model => model.ParentId, new { @id = "edit_ParentId", @Name = "edit_ParentId" })
    <div class="editor-label">
        @Html.LabelFor(model => model.FieldLabel)
    </div>
    <div class="k-edit-field">
        @Html.EditorFor(model => model.FieldLabel)
        @Html.ValidationMessageFor(model => model.FieldLabel)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.FieldType)
    </div>
    <div class="k-edit-field">
        @(Html.Kendo().DropDownListFor(model => model.FieldType)
            .HtmlAttributes(new { style = "width:100%" })
            .AutoBind(false)
            .DataSource(source =>
            {
                source.Read(read =>
                {
                    read.Action("GetFieldTypes", "Configurator");
                });
            })
            )
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.DropdownValues)
    </div>
    <div class="k-edit-field">
        @Html.EditorFor(model => model.DropdownValues)
        @Html.ValidationMessageFor(model => model.DropdownValues)
    </div>
</div>

Aleksandar
Telerik team
 answered on 23 Nov 2022
0 answers
116 views

Dear team,

We upgraded kendo version from  Kendo UI v2015.1.429 to Kendo UI v2022.2.510. In the upgraded version we are having small ui presentation issuein chart legends. find the below screens ,and we want as square shape legends. Please suggest any way to resolve this issue.

 

Regards,  Appreciate your support.

sai
Top achievements
Rank 1
Iron
 updated question on 22 Nov 2022
0 answers
109 views

Dear team,

We upgraded kendo version from  Kendo UI v2015.1.429 to Kendo UI v2022.2.510.In the upgraded version we are facing small ui presentation issue in Grid. On default in pageination, page numbers are not able to load in grid . It is showing empty. For Old version, defaultly it will display 0 in pagination. Below are teh Screen shots for more reference.

 

 

sai
Top achievements
Rank 1
Iron
 updated question on 22 Nov 2022
0 answers
120 views

I have written detail expand function on index page and my kendo grid is on another page. my other functions are accessible but can't access detail expand and other functions related to kendo grid. need vb.net mvc code. 
can anyone please help.

 

function detailExpand(e) {           
            if (expandedRow != null && expandedRow[0] != e.masterRow[0]) {
                var grid = $('#drgdgrid').data('kendoGrid');
                $(".k-master-row").each(function (index) { grid.expandRow(this); });
                grid.collapseRow(expandedRow);
                expandedRow.next().remove();
            }
            expandedRow = e.masterRow;
            //id = expandedRow[0].cells[0].innerText;
            var masterDataItem = $('#drgdgrid').data('kendoGrid').dataItem(expandedRow);
            expandedDataItem = masterDataItem;
            if (masterDataItem.code != null && masterDataItem.code != '') {
                $(".hideAddButton").hide();
           }
            else {
               $(".hideAddButton").show();
            }

            

        }
sonali
Top achievements
Rank 1
 asked on 21 Nov 2022
0 answers
112 views
Is it possible or work around to skip for example, if I have a chart with the past seven days in the categoryAxis, but to skip the weekends?
Porsha
Top achievements
Rank 1
 asked on 18 Nov 2022
1 answer
416 views

We are using the kendo grid and detail template.

Is there a way to do the following with the expand/collapse column?

1: Add a tooltip to the expand/collapse icon?

2: Add column header to the expand/collapse column?

 

Nikolay
Telerik team
 answered on 18 Nov 2022
0 answers
113 views

Hi,

I want to add custom field to combobox Editor in Kendo grid but it's not working can anyone help me? Many thanks!
In the image below I have an IsActive : true column when loading data, but when I edit I don't see it.

Mr Chuc
Top achievements
Rank 2
Iron
Iron
 asked on 18 Nov 2022
0 answers
2.9K+ views

Download 2022.1.301 commercial. The file is 10 MB or so. Same for versions 2022.1.412, 2022.2.510, 2022.2.621, 2022.2.802, and 2022.3.913.

When we get to the 2022.3.1109 commercial download it is no longer included. A 1kb file is there with build statements like importing other files. I need the real file.

Paul
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 17 Nov 2022
0 answers
134 views

I have the exact same HTML as the example of a kendo grid but the payloads are completely different mine is:

HTML:

while the payload from the example is:

Example HTML

 

John
Top achievements
Rank 1
 updated question on 16 Nov 2022
2 answers
5.9K+ views

I have a grid I've created in MVC that is throwing the following error when I set the datasource

kendo.all.js:311085 Uncaught TypeError: Cannot read properties of undefined (reading 'id')

Using version 2022.2.802.545

Here is my grid

@(Html.Kendo().Grid<MyModelName>()
            .Name("event-violations-grid")
            .Columns(columns =>
            {
                //columns.Select().Width(50);
                columns.Bound(s => s.SupplierNumber).Hidden(true);
                columns.Bound(s => s.SupplierName).Width(275);
                columns.Bound(s => s.OldOrderDate).Format("{0:MM/dd/yyyy}").Hidden(true);
                columns.Bound(s => s.OldDeliveryDate).Format("{0:MM/dd/yyyy}").Hidden(true);
                columns.Bound(s => s.NewOrderDate).Format("{0:MM/dd/yyyy}").Hidden(true);
                columns.Bound(s => s.NewDeliveryDate).Format("{0:MM/dd/yyyy}").Hidden(true);
                columns.Bound(s => s.ArrivalDate).Format("{0:MM/dd/yyyy}").Hidden(true);
                columns.Bound(s => s.TransmitTime).Hidden(true);
                columns.Bound(s => s.ExpectedDeliveryTime).Hidden(true);
                columns.Bound(s => s.Action).Width(180);
                columns.Bound(s => s.ActionComments);
            })
            .Sortable()
            .Scrollable(s => s.Height("215px"))
            .HtmlAttributes(new { style = "height:250px;" })
            .Resizable(r => r.Columns(true))
        )

(I know there is a lot of hidden columns there.. I may or may not need them yet)

Then I have some javascript which populates a dataSource and sets to this grid

function getViolations() {
    var vdata = {};
    vdata["stageId"] = _stageId;
    vdata["stores"] = "" + _stores.join(',');
    vdata["supplierNumber"] = _eventRevertData.SupplierNumber;
    vdata["origDeliveryDate"] = kendoDateOnly(_eventRevertData.Start);
    vdata["newDeliveryDate"] = null;

    var dataSource = new kendo.data.DataSource({
        schema: {
            model: {
                fields: {
                    SupplierNumber: { type: "number" },
                    SupplierName: { type: "string" },
                    OldOrderDate: { type: "date" },
                    OldDeliveryDate: { type: "date" },
                    NewOrderDate: { type: "date" },
                    NewDeliveryDate: { type: "date" },
                    ArrivalDate: { type: "date" },
                    TransmitTime: { type: "string" },
                    ExpectedDeliveryTime: { type: "string" },
                    OrderGroup1: { type: "boolean" },
                    OrderGroup2: { type: "boolean" },
                    OrderGroup3: { type: "boolean" },
                    OrderGroup4: { type: "boolean" },
                    OrderGroup5: { type: "boolean" },
                    OrderGroup6: { type: "boolean" },
                    OrderGroup7: { type: "boolean" },
                    OrderGroup8: { type: "boolean" },
                    Action: { type: "string" },
                    ActionComments: { type: "string" }
                }
            }
        },
        transport: {
            read: {
                url: "/MyController/GetViolationsGrid1",
                data: vdata,
                dataType: "json"
            }
        }
    });
    dataSource.fetch(function () {
        let data = this.data();
        console.log(data);
        var grid = $("#event-violations-grid").data("kendoGrid");
        grid.setDataSource(data);
    });
}

This works - my grid displays exactly as I expect, and updates when I call my function (the vdata changes depending on other things)

However, I'm getting this error:

If I open that, I can see that the part of "my" code is here:

Which brings me to here

I have confirmed that I can get as far as line 1228 without issue.. my console.log works and I can see my data.. it seems like it is happening when I'm setting the data source

Any help would be greatly appreciated!

Thanks

 

Thomas
Top achievements
Rank 1
Iron
 updated answer on 16 Nov 2022
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Dialog
Chat
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?