Telerik Forums
Kendo UI for jQuery Forum
2 answers
220 views

I've tried to simplify the code as much as possible with this example:

https://dojo.telerik.com/aJARADIk

If I create a chart with a shared tooltip, I can switch back and forth between shared and unshared tooltips without issue. If I create a chart with an unshared tooltip and try to set shared = true in the options, then redraw the chart, the tooltip will not display on hover. It will display on click, but even showOn = "mouseenter" will not help.

I've compared the options objects between the two charts in the example and they are essentially identical with a few spots where the series tooltip is still false or the font is set. The commented out code is meant to show that fixing these differences does not make this work.

At this point, I'm assuming that creating the chart with shared = true does something that shared = false does not, e.g. registering events for the shared tooltip, but I can't figure out what it is. Is there something that needs to be done in addition to setting shared = true or is this a bug that needs to be reported?

Joe
Top achievements
Rank 1
 answered on 05 Feb 2019
1 answer
357 views
Hello,
        How to use aggregate function in kendo mvvm grid and limit sum to 2 decimal places. sum is applied in Original Amount . Its MVVM and console error displays sum is not defined



<div data-role="grid" id="IGrid"
                data-editable='true'
                data-columns='[
                { "field": "Description", title: "Description"},
                {
                  "field": "OriginalAmount", title: "Amount", width: "100px",  editable: function () {  return false; }, template: kendo.template($("\\#GstAmount").html()),
                   footerTemplate: "Total: #=sum#")
                },
                {command:[{name:"destroy"}]}
                ]'
                data-bind='source: GST.GSTBreakup ,events: {dataBound: parent().GridDataBound}'
                style="height: 200px"></div>
Alex Hajigeorgieva
Telerik team
 answered on 05 Feb 2019
2 answers
137 views

Hello, 

        I have selectedValue (complex object with 12-16array to which i form grid in template and other 30-35 values bound to numeric textbox) . Initially, the bind selectedValue ovject to template. When i set the object, ui gets generated, when i update the selectedValue , the whole UI gets repainted in View. It renders slow , is it made to redraw UI components again or only values in components should get updated only (no redraw) ?

Veselin Tsvetanov
Telerik team
 answered on 05 Feb 2019
1 answer
383 views

We recently upgraded from release 2017.2.621.440 to release 2019.1.115.

Previously, the following code:

<button id='texCov_setEmpty' class='tcov-button'>1. Set All Adjustments to <span> No </span> Adjustment</button><br />
<button id='texCov_setPreferred' class='tcov-button'>2. Set All Adjustments to <span> Preferred </span> Adjustment</button><br />
<button id='texCov_setLowest' class='tcov-button'>3. Set All Adjustments to <span> Lowest Overlap </span></button>
 
.tcov-button > span {
   font-weight: bold;
}

 

would display properly, but with the upgrade to the new release the leading/trailing spaces in the span are removed/ignored (see attached file).

Not a big deal - I fixed it by modifying the CSS:

.tcov-button > span {
   font-weight: bold;
   margin-left: 3px;
   margin-right: 3px;
}

 

I was just wondering if I was doing something, or if an unintended change had occurred at some point?

Thanks, Gregg

 

 

 

 

Marin Bratanov
Telerik team
 answered on 04 Feb 2019
6 answers
1.4K+ views
I have a pretty basic data model that I'm trying to bind to a grid but I get stuck on the implementation on how to bind this specific object because it's primary key is a composite of two different columns. I'm using the Kendo UI MVC Beta at the moment. Any suggestions on how this is done? I haven't had much look searching so far.

My two columns I need for the Id are ContactNumber and ClientNumber. Below I have ContactNumber only so far.

Edit: Crap, I just noticed there are dedicated forums for the MVC version of Kendo UI. I don't suppose a moderator could move this for me?

@(Html.Kendo().Grid(Model)
    .Name("Grid")
        .Columns(columns =>
            {
                columns.AutoGenerate(true);
                columns.Command(command =>
                    {
                        command.Edit();
                        command.Destroy();
                    });
            })
    .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.PopUp))
    .DataSource(dataSource => dataSource
        .Server()
        .Model(model => model.Id(p => p.ContactNumber))
            .Read(read => read.Action("Index", "ContactRep"))
            .Update(update => update.Action("Edit", "ContactRep"))
            .Create(update => update.Action("Create", "ContactRep"))
            .Destroy(update => update.Action("Delete", "ContactRep")))
    .Pageable()
    .Sortable()
    .Filterable()
    .Groupable())
Konstantin Dikov
Telerik team
 answered on 04 Feb 2019
2 answers
78 views

Greetings,

In the current version (2019 Q1) the expand Icon of the treeview node is being reset, if another node is dropped above it. To reproduce this behaviour you can take the Drag and Drop demo of the treeview. In the inital state the "Furniture" node is expanded. If you take the "Decor" node and drop it above the furniture node, the "Furniture" node stays expanded but the icon changes to collapsed.

Marin Bratanov
Telerik team
 answered on 04 Feb 2019
6 answers
2.2K+ views
Hi,
I need a kendo grid with two columns for a single field, but with different editors:

                {
                    field: "VGNCode" // default text box editor
                },
                {
                    field: "VGNCode",
                    editor: codeDropDownEditor
                },

When i go into edit mode, both editors show up in both columns.
I expect the text box editor to show up in the first column and the dropdown list in the second column.

Is this a bug?
Is there a work-around?

I’m using Kendo UI v2016.3.1118 with AngularJS.

Thanks in advance!
Rebecca
Top achievements
Rank 1
 answered on 01 Feb 2019
2 answers
90 views

In the example below there is an array of values displayed using an ng-repeat directive. They are all bound to drop down lists with a common data source. The valuePrimitive setting is false so a proper POJO is set to and bound to k-ng-model. However, when the drop downs are rendered the selected value is not displayed. The selected value is present as evidenced by the Selection output.

How can the value be displayed when it is not a primitive and it is pre-loaded (e.g. not selected by the user)?

https://dojo.telerik.com/EjEDoQAG

Matt
Top achievements
Rank 1
 answered on 01 Feb 2019
3 answers
529 views

Hello

Is there a way to add/remove/edit TreeList columns dynamically? We need to allow the user to manipulate the columns and the data in them.

Thanks

Preslav
Telerik team
 answered on 01 Feb 2019
1 answer
4.7K+ views

Hi,

I created a select list in my controller and then returned it as Json for the dropdown

Controller:

/// <summary>
        /// Prepare available cargo types
        /// </summary>
        /// <param name="items">Cargo Type items</param>
        /// <param name="withSpecialDefaultItem">Whether to insert the first special item for the default value</param>
        /// <param name="defaultItemText">Default item text; pass null to use default value of the default item text</param>
        public virtual IList<SelectListItem> PrepareAvailableCargoTypes(IList<SelectListItem> items, bool withSpecialDefaultItem = true, string defaultItemText = null)
        {
            if (items == null)
                throw new ArgumentNullException(nameof(items));
 
            var selectListItems = new List<SelectListItem>()
    {
            new SelectListItem() { Value = "1", Text = "Dry Bulk" },
            new SelectListItem() { Value = "2", Text = "Breakbulk" },
            new SelectListItem() { Value = "3", Text = "Project" },
            new SelectListItem() { Value = "4", Text = "FCL Container" },
            new SelectListItem() { Value = "5", Text = "LCL Container" },
            new SelectListItem() { Value = "6", Text = "Liquid Bulk" },
            new SelectListItem() { Value = "7", Text = "RoRo" },
            new SelectListItem() { Value = "8", Text = "Other" }
    };
 
            items = selectListItems;
 
            return items;
        }
 
 
 
public JsonResult GetAvailableCargoTypes()
        {
            var model = new CargoMasterModel();
            return Json(PrepareAvailableCargoTypes(model.AddCargoDetailModel.AvailableCargoTypes, false));
        }

Cshtml:

columns: [
                            {
                                    field: "CargoType",
                                    title: "Cargo Type",
                                    width: 200,
                                    editor: cargoTypeDropDownEditor,
                                    //template: "#= #"
                            },
 
//and function
 
function cargoTypeDropDownEditor(container, options) {
                            $('<input required name="' + options.field + '"/>')
                                .appendTo(container)
                                .kendoDropDownList({
                                    autoBind: false,
                                    dataTextField: "Text",
                                    dataValueField: "Value",
                                    dataSource: {
                                        serverFiltering: true,
                                        dataValueField: "Value",
                                        transport: {
                                            read: {
                                                type: "POST",
                                                dataType: "json",
                                                url: "@Html.Raw(Url.Action("GetAvailableCargoTypes", "CargoAdmin"))"
 
                                            }
                                        }
                                    }
                                });
                        }

 

So far dropdown editor works great, but displays only the value. How can I make the grid display Text value of my select list based on value?

Georgi
Telerik team
 answered on 01 Feb 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?