Telerik Forums
Kendo UI for jQuery Forum
1 answer
143 views

How to use kendo upload file to send xlsx to api?

service is using closedxml to store data to datatable.

Martin
Telerik team
 answered on 07 Apr 2021
1 answer
192 views
This dojo accurately reproduces my problem: https://dojo.telerik.com/EKEGAqoq

If you update the ProductName will just plain text (no rich-text editor options), the grid updates fine, but as soon as you use one of the rich-text features (bold, italics, bullet, numbering, etc.), the grid does not update and the model is marked as "dirty".
Neli
Telerik team
 answered on 07 Apr 2021
6 answers
574 views

The standard fontFamily toolbar menu lists the following fonts: "Arial", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS", "Verdana"

 

I'd like to add additional ones to the list but haven't been able to figure out how. There appears to be support for customizing the list by setting a fontFamilies property somewhere, but I haven't been able to figure out where to do this or how to get a reference to the drop down list.

 

Thanks

 

Petar
Telerik team
 answered on 07 Apr 2021
14 answers
453 views

I have Index.shtml with Grid control:

 
@(Html.Kendo()  
    .Grid<EditingWithServerValidation.Models.Product>()  
    .Name("Grid")
    .Columns(columns =>
        {
            columns.Bound(p => p.Id);          
            columns.Bound(p => p.Name);          
            columns.Command(command => command.Edit()).Width(100);
        }) 
   .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("Details"))
   .DataSource(dataSource => dataSource
       .Ajax()
       .Batch(false)
       .ServerOperation(false)
       .Model(model => model.Id(p => p.Id))
       .Read("_Read", "Home")
       .Update("_Update", "Home")     
   )
)
 

 Controller have _Read method

public ActionResult _Read([DataSourceRequest] DataSourceRequest request)
{
      List<Product> MyProduct = GetProductsList();
      return Json(MyProduct.ToDataSourceResult(request));
}
public ActionResult Index([DataSourceRequest] DataSourceRequest request)
{
     ViewBag.AreaOfLaw = GetAreaLaw();
     return View();
}
private List<Product> GetProductsList()
{
    List<Product> MyProd = new List<Product>();
    for (int i = 1; i < 10; i++)
    {
        Product p = new Product();
        p.Id = i;
        p.Name = "Product #" + i.ToString();
        MyProd.Add(p);
    }           
 
    return MyProd;
}
private List<TreeViewItemModel> GetAreaLaw()
{
    List<TreeViewItemModel> TVList = new List<TreeViewItemModel>();
    TreeViewItemModel AL = new TreeViewItemModel();
    AL.Id = "1";
    AL.Text = "ROOT-1";
    AL.HasChildren = true;
    AL.Expanded = true;
    TreeViewItemModel SubAL = new TreeViewItemModel();
    SubAL.Id = "3";
    SubAL.Text = "Sub-1-1";
    AL.Items.Add(SubAL);           
    TVList.Add(AL);
 
    AL = new TreeViewItemModel();
    AL.Id = "2";
    AL.Text = "ROOT-2";
    AL.HasChildren = true;
    AL.Expanded = true;
    SubAL = new TreeViewItemModel();
    SubAL.Id = "4";
    SubAL.Text = "Sub-2-1";
    AL.Items.Add(SubAL);
 
    SubAL = new TreeViewItemModel();
    SubAL.Id = "5";
    SubAL.Text = "Sub-2-2";
    AL.Items.Add(SubAL);
 
    TVList.Add(AL);
    return TVList;
}
And Model describe Product:

public class Product
{
    public int Id { get; set; }       
    [Required]
    public string Name { get; set; }    
}

Details.shtml Custom PopUP template as simple as possible (I remove from this template all other markup except treeview )

<div id="tv" style="overflow:scroll; height:200px;">   
@(Html.Kendo().TreeView()
.Name("treeview")
.Checkboxes(true)
.BindTo((IEnumerable<TreeViewItemModel>)ViewBag.AreaOfLaw)           
)  
</div>
 

When I run it - I got the grid , Edit click Open Popup with Treeview , but Checkboxes behavior is weird - click on any one checkbox Select All or Clead All checkboxes on the screen

When I move Treeview from Popup template on Index.shtml page it's working as expected. Please advise. 

 

 

 

 

 

 

 

 

 

Neli
Telerik team
 answered on 06 Apr 2021
2 answers
803 views

Currently my grid implementation is using the popup editor and a kendo template to render the markup. I was able to use the KendoEditor widget (rich-text editor) inside the popup by calling it inside the grid's Edit event. Making normal text changes does not pose a problem, but when I make changes using the KendoEditor features (bold, italics, bullets, etc.) the grid does not save, and the grid field in question (HeadLine) is marked as dirty. How do I get around this? Thank you.

 

Markup:

<body>
<div id="grid"></div>
 
<script id="popup-editor" type="text/x-kendo-template">
    <form class="k-form k-form-vertical" id="headline-popup">
        <div>
            <label class="k-edit-label" for="Headline">News Headline</label>
            <div class="k-edit-field">
                <textarea id="headline-test" name="HeadLine" rows="4">#: HeadLine#</textarea>
            </div>
        </div>
    </form>
</script>
</body>

 

JavaScript:

$("#grid").kendoGrid({
        dataSource: data,
        columns: [
            { field: "Headline", title: "News Headline", width: "5%", headerAttributes: { "class": "font-weight-bold" } },
            { command: ["edit"], width: "10%" }
        ],
        editable: {
            mode: "popup",
            template: kendo.template($("#popup-editor").html()),
        },
        edit: function (e) {
            $("#headline-test").kendoEditor({});
        },
});
Tsvetomir
Telerik team
 answered on 05 Apr 2021
5 answers
445 views
On my page I have my body element centered in the browser window with body { margin: 0 auto; }.  When I trigger any popup, such as an autocomplete list or kendo window, the popup wrapper is positioned too far to the right.  

For example, if the body's left offset is 400px, then that's how far off to the right the popup window is misplaced.  If I shrink my browser window so it just fits the body (making the body margin effectively 0) then the popup is positioned correctly.

So, it appears that having an auto margin on a parent element is not being handled properly when calculating the position of the popup container.
Nadezhda Tacheva
Telerik team
 answered on 05 Apr 2021
15 answers
2.2K+ views

How can I add a tooltip to my dropdown running in MVC? I have tried several ways I found online and in the forum but no luck.

html page code:

how can I add a tool tip to this drop down? I want to show some more details about the car when the users hovers over it

<select id='cars' class='dropdownlist'>
<option value=0>Select make</option>
  <option value='@Model.NewCars.CarId'>@Model.NewCars</option>
</select>

 

Aleksandar
Telerik team
 answered on 05 Apr 2021
12 answers
894 views

after upgrading to 2017 the html I have in my title property is not rendered as html.

Has this changed?

I used to have something like this:

         filters.kendoWindow({

            width: "210px",
            height: "470px",
            title: "Filters <span class='ise-window-title-post-fix'>drag me</span>",
            position: { top: 100, left: 5 },
            pinned: true,
            visible: false,

Dimitar
Telerik team
 answered on 05 Apr 2021
4 answers
181 views
Hello folks,
I have a question related to Kendo and jQuery compatibility. In my project, we rely on Kendo UI for jQuery for most of our UX components. We are using Kendo UI version 2018.1.117 and the jQuery version 1.12.2.
We are trying to upgrade jQuery to 3.5 and want to know if this will still work with our current Kendo version (2018.1.117). I understand jQuery and Kendo are closely related and we eventually want to upgrade Kendo to latest 2020.2.617 too but upgrading both at the same time is not something we would prefer. We prefer to take incremental approach of upgrading jQuery first, followed by Kendo upgrade.
Documentation here specifies the supported jQuery version for Kendo. Is there any documentation that will point what components will break if we are at an unsupported jQuery version? I did a quick spike with [ Kendo 2018.1.117 + jQuery 3.5 ] and there were no visible issues.
Looking for your suggestions here. Thank you!
canra
Top achievements
Rank 1
 answered on 04 Apr 2021
4 answers
718 views

Hello. 

I modifed an example from demo. To add one child node to selected node.

https://dojo.telerik.com/uhUnukOJ/3

Left side is copy from demo, right side other simple version.

Right side add only to the root. And left side works strange.

Second. I have config a hierarhicalDataSource

var treeData = new kendo.data.HierarchicalDataSource({
            transport: {
                read: {
                    url: "api/ui/UIData/folders",
                    contentType: "application/json",
                    dataType: "json",
                    data:
                        {
                            id_hierarchy: 1
                        }
                }              ,
             

                requestEnd: function (e)
                {
                    //check the "response" argument to skip the local operations
                    console.log(e);
                }
            }
        });

It loads root nodes. But does not show any children nodes after loading. requestEnd does not fire too.

 

Stoyan
Telerik team
 answered on 02 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?