Telerik Forums
Kendo UI for jQuery Forum
1 answer
130 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
734 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
163 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
62 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
503 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.2K+ 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
193 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
1 answer
68 views
I have a requirement to toggle between the view in kendo UI scheduler, my view will be week but on checkbox click i want to change week view type between week and workWeek; how to do this?
Veselin Tsvetanov
Telerik team
 answered on 22 Feb 2017
2 answers
107 views
https://jsfiddle.net/VadimMalkov/1t6se0qq/

1. cann't drop .item on empty listview
2. placeholder moving on mouse over .item, but not on listview area
Stefan
Telerik team
 answered on 22 Feb 2017
7 answers
376 views
Is there any way to make kendo ui scheduler select multiple custom event templates across different groups in Horizontal grouping with ctrl + mouse down. Currently only one event or multiple events in same group are multiselect. Exact scenario is depicted in attached image.
Sameer
Top achievements
Rank 1
 answered on 22 Feb 2017
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
Chat
DateRangePicker
Dialog
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?