Telerik Forums
Kendo UI for jQuery Forum
1 answer
211 views

Hello,

When importing data from a file (calling fromFile method, or using the open button of the control) that uses es-ES culture, date cells are rendered as in en-US format, although the value remains in es-ES format.

Is there any way to fix this issue?

Veselin Tsvetanov
Telerik team
 answered on 23 Feb 2017
6 answers
216 views

Hello all

Our grid should be updated every one second with several (10-15) new rows.

To implement it, we recreate data (gridView) every second as follows:

this.gridView = {
      data: this.petService.pets.slice(this.skip, this.skip + this.pageSize),
      total: this.petService.pets.length
    };

 

but this takes about 7% CPU.

Is there a better way to update the grid (for example - add a new rows only instead of data recreation) ?

Thanks

 

Best Regards

Mark Nebrat

};

Dimiter Topalov
Telerik team
 answered on 23 Feb 2017
1 answer
99 views

I have a simple formula ( = A1 + A2 ). But the formula doesn't work, as A1 and A2 are both read only cells. I see this as a valid use case, as we do not want users to change parts of the formula. Is this a bug or intended behaivour?

Thanks

Marc

Marc
Top achievements
Rank 1
 answered on 23 Feb 2017
1 answer
119 views

I've been using the below code snippet to save a filtered grid (with paging) to an Excel file with no issues.  Once I upgraded I'm getting the above error "kendo.util.encodeBase64 is not a function"

01.function saveExcel(e) {
02.    e.preventDefault();
03.    var dataUri = "data:text/plain;base64," + kendo.util.encodeBase64(JSON.stringify(e.data));
04.    kendo.saveAs({
05.        dataURI: dataUri,
06.        proxyURL: "@Url.Action("ExcelExport", "ControllerName")",
07.        forceProxy: true
08.    });
09.}

 

 

Did this function go away or change?  Is there a better way to save an Excel file that needs to pull more columns than that is on the grid, that is also filtered and has paging.  Basically my MVC controller method does a data pull based on the filter of the grid.

Dimiter Topalov
Telerik team
 answered on 23 Feb 2017
2 answers
723 views

I'm trying to set a command button using a template, but when I used the example from http://jsfiddle.net/valchev/Q69by/15/, the template does not seem to be running and the column is not being displayed.  I've created the following: http://dojo.telerik.com/@pnd@qad.com/AXIVU.  Can anyone tell me why the first button is not showing up and why how to get it to change based on the first column being boolean yes, then to change the text to "stop job" and if it is false, change it to "Start Job".

 

Any help is greatly appreciated.

Paul
Top achievements
Rank 1
 answered on 22 Feb 2017
4 answers
153 views

The Angular 2 panel bar creates its contents again and again on every event, when its contents needs displayed. This seems not to hurt much, when the inner structure is merely a few simple DOM Elements. But what, if the embedded component expensive to be constructed (because it may need a server request) and possibly very complex (because it may be host to a sohphisticated spreadsheet component, which it is in my case)?

Here is an example (full source in Plunker here): assume you are nesting the expensive component in the panelbar, just like the examples suggest to do:

<kendo-panelbar>
   <kendo-panelbar-item [title]="'First Title'">
      <template kendoPanelBarContent>
         <my-expensive-component></my-expensive-component>
      </template>
   </kendo-panelbar-item>
   <kendo-panelbar-item [title]="'Second Title'">...</kendo-panelbar-item>
</kendo-panelbar>

 

Initially, the panel bar just only the headers "First...", "Second"... when you open one of them, the content is created. That will take some while. When this is finished, the full content is visble. Now when you click on the "Second" panel, a strange thing happens: the second content is lazily created (that's ok) but also the first section is created again, even if it remains visible all the time. That is unexpected.

Even if the above behaviour is only a bug, I fear that the design of the PanelBar component is a bit too simplistic: whenever one opens / closes one of the panels in the stack, the inner component will be constructed, again and again and again ... can this be avoided? 

If it would be only about the private data, one could think of a workaround, where the data is stored not in the component, but in a service, which gets injected. That would not necessarily result in beautiful code, but it may do the trick for the component's data. But what about inner complex DOM structure? My use case is, that inside the panel bar, I would like to put an Excel Spreadsheet (SpreadJS) - I would not just recreated the entire spreadsheet, on every show/hide event.

By the way - the same problem also applies to the Angular-Tab component. That one seems to have the identical create-from-template behaviour. Is there anything I can do about the frequent reconstruction of the components?

Alexander
Top achievements
Rank 1
 answered on 22 Feb 2017
1 answer
58 views

I came across this issue when I was searching for a solution: https://github.com/telerik/kendo-ui-core/issues/2401

The issue is closed but it is not clear if it was fixed in a later release or not.  It is definitely a bug.

Could you please tell me if it has been fixed, and if so, when the release will be?  In the meantime, is there a workaround?

Thanks,

Jane

Ivan Danchev
Telerik team
 answered on 22 Feb 2017
1 answer
488 views

Hi, 

Are there any limitations when executing 'preventDefault()' in the end Callback of the Sortable widget? Below is a snippet of my 'end' callback that Im having trouble with. 

end: function(e) {
    if (e.oldIndex == e.newIndex) {
        e.preventDefault();
        return false;
    }
 
    $.when(promptForDuration())
        .done(function(result) {
                alert("success: " + result)
        })
        .fail(function() {
                console.log(e);
            e.preventDefault();
            return false;
        });
}

If the old and new index are the same, the 'preventDefault()' works fine, rolling back any chages made by the user. However if they are not the same I've created a custom KendoWindow to prompt for a new duration to be entered and returned using deferred promises (not sure if I've described that right).
The 'fail' callback is triggering and the console.log is printing the sortable event info:

Object {
  _defaultPrevented: true,
  action: "sort",
  draggableEvent: Object,
  isDefaultPrevented: (),
  item: A.fn.init[1],
  newIndex: 1,
  oldIndex: 0,
  preventDefault: (),
  sender: init,
  __proto__: Object }

But still the 'preventDefault()' is not either not running or not having an affect of the Sortable widget.

Please advise on how this can be resolved.

Kind Regards,
Grant

Stefan
Telerik team
 answered on 22 Feb 2017
1 answer
2.1K+ views

I see that Kendo has a Dynamic Linq library that handles the paging, sorting and filtering for you for MVC apps. I was reading about it here.  The following example is given:

<p>using Kendo.DynamicLinq;
 
public class EmployeesController : Controller {
 
  [HttpPost]
  public ActionResult Get(int take, int skip, IEnumerable<Kendo.DynamicLinq.Sort> sort, Kendo.DynamicLinq.Filter filter) {
    var employees = _context.Employees.OrderBy(e => e.Employee_ID)
      .OrderBy(e => e.Employee_ID)
      .Select(e => new Models.Employee {
        EmployeeID = e.Employee_ID,
        FirstName = e.First_Name,
        LastName = e.Last_Name,
        Title = e.Title,
        BirthDate = e.Birth_Date
    });
 
    return Json(employees.ToDataSourceResult(take, skip, sort, filter));
  }
}<br></p><p></p><p></p>

 

It seems to me that a problem with this approach is that there is no chance to do any mapping from the data entities which are returned from the database call to to a DTO entity. What I do in my app is execute a databaes call using EF and map the EF entity to an application entity. Is there a way I can still do this given the example above. In other words, I'd like the ToDataSourceResult function to create a Json document based on the mapped DTO entity and not the EF database entity.

Alex Hajigeorgieva
Telerik team
 answered on 22 Feb 2017
1 answer
184 views

Hello.

Recently I have following problem. In grid component I want to use orderBy function to sort data in my table (like in the example). Of course everything works fine. Problem coming out when I try to run my tests (npm run test). I get the following error: "XHR error (404 Not Found) loading node_modules/@progress/kendo-data-query/dist/npm/main.js". I saw that in my *.js file compiler added "kendo-data-query" to System.register array. Is there any solution for that problem? I hope that you can understand my problem here.

Rosen
Telerik team
 answered on 22 Feb 2017
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?