Telerik Forums
Kendo UI for jQuery Forum
1 answer
276 views

We are running into a (I think) simple issue with Kendo UI Grid.

Situation is best explained using an image (see attached).

My grid has 4 columns: ID, External Code, Manufacturer,Type.
When I sort, everything works fine, no issues.

When we hide the "External Code"-column (the second column) the table reloads and all is well. 

Now, when we sort on the NEW second column (Manufacturer) the following happens:
1. [Correct] The grid is sorted properly
2. [Correct] The Manufacturer table header gets the 'k-sorted' class, making it blue, showing an arrow 
3. [Issue] The k-sorted class is added to the wrong <col> in the table body <colgroup> definition.

In this case it's adding k-sorted to the third column - which is the original position of the manufacturer column.

Is this a bug in kendo, or are we doing it wrong™?

Additional info

- We're using the latest kendo javascript library.
- We're hiding/showing columns using the $("#grid").data("kendoGrid").hideColumn("internalColumnName") API

 

Please advise,

Jan Herman
Top achievements
Rank 1
 answered on 16 Aug 2017
6 answers
320 views
Hi there, i`ve a little question. how i can reset the legend of chart? i mean, when i`m turn of some series and refresh or redraw chart, the series stay turned off. Thx.
Stefan
Telerik team
 answered on 16 Aug 2017
3 answers
128 views

Let's say we have this tree: A -> B -> [C,D]  where A = root node, B = childnode of A, nodes C and D are children of B).

When I check node C or D without filters applied, nodes A and B get the indeterminate state correctly. 

However, when I apply a filter (i.e. text contains C), node D get's hidden. When I now check node C, both nodes A and B also get checked, while they should be indeterminate since node D is not checked.

Using Kendo UI version 2017.2.621, OS Windows 10, Chrome 59.0.3071.115 (64-bit), jQuery version 1.12.4

Attached files:

  • Initial state
  • Checked C with filter applied
  • Removed filter with C being checked (incorrect indeterminate state for A and B)
  • Expected result (after removing filter, but should also have indeterminate state when filtering is still applied)
Ivan Danchev
Telerik team
 answered on 16 Aug 2017
4 answers
279 views

I've managed to recreate this bug in the Dojo.

http://dojo.telerik.com/EPOWex

 

The problem is only occurring in Edge (Chrome and IE are working correctly). 

After you select a value from the AutoComplete and set it to enable(false). Notice that in Edge you can still select the text in the widget. Simply then press the del-key and the value is removed...

 

 

 

 

Gerard
Top achievements
Rank 1
 answered on 16 Aug 2017
2 answers
310 views
hello, all. I would like to have a little assistance. I'm exporting grid information as a pdf file. the grid contains character latin as well as Cyrillic, Latin characters are displayed normally but Cyrillic are replaced with symbols. I have read all the posts about the issue, have read the documentation but nothing has worked for me. if you have any ideas and can share would much appreciate it. 
Giorgi
Top achievements
Rank 1
 answered on 16 Aug 2017
2 answers
434 views

Is it possible to override the value axis label content?

<kendo-chart-value-axis-item-labels format="n" [visual]="drawLabel"></kendo-chart-value-axis-item-labels>

Format I believe uses the Intl service which in turn uses the LOCALE_ID - I'm changing culture dynamically so I cannot use this.

Visual takes a function which might have worked except you have no reference to the component so I can't use any injected services to format the text.

The tooltip has a template option so something like this works for me there, using a custom pipe:

<kendo-chart-tooltip>
  <ng-template kendoChartSeriesTooltipTemplate let-value="value">
    {{ value | intlNumber }}
  </ng-template>
</kendo-chart-tooltip>

Is there anything I'm missing that could achieve this for value axis labels?

esp
Top achievements
Rank 1
Veteran
 answered on 15 Aug 2017
3 answers
158 views

Hello Telerik Team,

We have a requirement in which we need to track the upload progress even after page is refreshed or a new URL is opened on the same website. Please suggest a way to achieve this with KendoUI upload control.

Thanks

Ivan Danchev
Telerik team
 answered on 15 Aug 2017
3 answers
405 views
So, I have this grid code (that i got from one of your examples), that Ive been trying out, it works find when paging using Ajax.

I have now tried turning off javascript functionality in the browser, to investigate the fallback functionality of the grid. When paging I then get the clean JSON text in my browser, nothing shows of my original page. How can I fix so that my code works well both with javascript datagets and without?

Index.cshmtl

@model IEnumerable<KendoUIMvc.Models.Product>



<div id="kjsimpleGrid">


    @(Html.Kendo().Grid<KendoUIMvc.Models.Product>(Model)
        .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(product => product.ProductID).Width(100);
                columns.Bound(product => product.ProductName);
                columns.Bound(product => product.UnitsInStock).Width(250);
                columns.Command(commands =>
                {
                    commands.Edit(); // The "edit" command will edit and update data items
                    commands.Destroy(); // The "destroy" command removes data items
                }).Title("Commands").Width(200);
            })
            .ToolBar(toolbar => toolbar.Create()) // The "create" command adds new data items
            .Editable(editable => editable.Mode(GridEditMode.InLine)) // Use inline editing mode
            .DataSource(dataSource =>
                dataSource.Ajax()
                  .Model(model =>
                  {
                      model.Id(product => product.ProductID); // Specify the property which is the unique identifier of the model
                      model.Field(product => product.ProductID).Editable(false); // Make the ProductID property not editable
                  })
                  .Create(create => create.Action("Products_Create", "Home")) // Action invoked when the user saves a new data item
                  .Read(read => read.Action("Products_Read", "Home"))  // Action invoked when the grid needs data
                  .Update(update => update.Action("Products_Update", "Home"))  // Action invoked when the user saves an updated data item
                  .Destroy(destroy => destroy.Action("Products_Destroy", "Home")) // Action invoked when the user removes a data item
            )
    .Pageable()
        )

</div>



Homecontroller.cs

public ActionResult Index()
        {

            //List<Product> products = new List<Product>();

            //foreach (Product product in this.productsDB.Products)
            //{
            //    products.Add(product);
            //}

            var products = productsDB.Products;

            //{
            //    Name = genre,
            //    Albums = this.storeDB.Albums.ToList()
            //};
                return View(products);


        }


        public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
        {
            using (var northwind = new NorthwindEntities())
            {
                IQueryable<Product> products = northwind.Products;
                DataSourceResult result = products.ToDataSourceResult(request);
                return Json(result, JsonRequestBehavior.AllowGet);
            }
        }


Konstantin Dikov
Telerik team
 answered on 15 Aug 2017
3 answers
170 views

Hello,

 

I am trying to manipulate min max of an axis item but the axis values are not correct.

Here is an example of the scenario - plunker

It is interesting when the axis values are whole numbers for example from 1 to 10 and you enter 5 the axis units are 50 for 5 then 51 for 6 and so on.

 

Another way of achieving what I want, that I can think of, is using the narrowRange property of the axis and then filtering the data but the property is not working at all..

 

Thanks

Georgi Mitev

Georgi
Top achievements
Rank 1
 answered on 15 Aug 2017
4 answers
620 views
Hi all

i want to get selected row and pass the ProductID to controller action, these is my code

@model TelerikMvcApp2.Models.Products@{
    ViewBag.Title = "1";
    var ProductID = 0;
    int x = 0;
}
<h2>Index</h2><div>
    @ProductID
</div><div>
    <h4>Basic Button</h4>
    <p>
    @(Html.Kendo().Button()
        .Name("primaryTextButton")
        .HtmlAttributes( new {type = "button", @class = "k-primary" } )
        .Content("Clear"))
       
    </p>
</div>
    <div id="clientsDb">
        @(Html.Kendo().Grid<TelerikMvcApp2.Models.Products>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(c => c.ProductID).Width(140);
                columns.Bound(c => c.ProductName).Width(190);
                columns.Bound(c => c.UnitPrice);
                columns.Bound(c => c.UnitsInStock).Width(110);
            })
            .HtmlAttributes(new { style = "height: 380px;" })
            .Scrollable()
            .Groupable()
            .Sortable()
            .Pageable(pageable => pageable
            .Refresh(true)
            .PageSizes(true)
            .ButtonCount(5))
                .Sortable()
            .Selectable(selectable => selectable
                .Mode(GridSelectionMode.Single)
                .Type(GridSelectionType.Row))
            .Events(events => events.Change("onChange"))
            .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("Customers_Read", "Home"))
            )
        )
      </div>    <div>        
        <img name="Pic1" alt="test" src='@Url.Action("Events", "Home", new { id = @ProductID })'/>
    </div>
       <script type="text/javascript">        function onChange()
        {
            var selectedrow = $("#grid").find("tbody tr.k-state-selected");
            var goods = $('#grid').data("kendoGrid").dataItem(selectedrow);
            var goodsjson = goods.toJSON();
            var goodsID = goodsjson.ProductID;
            document.Pic1.src = '@(Url.Action("Events", "Home", new { id= goodsID}))';
                    }</script>   

it can build successfully but when run it, it will show The name 'goodsID' does not exist in the current context 
Stefan
Telerik team
 answered on 15 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?