Telerik Forums
Kendo UI for jQuery Forum
3 answers
352 views

Hi,

 

I am currently trying to implement a highlighting feature on the scheduler where I set certain classes on elements in the scheduler when an event is being moved by the user.

 

This works great as long as the user does not cancel the drag operation by hitting the escape button, because then my cleanup code is not getting called. There are moveStart, move, and moveEnd event handlers available, but moveEnd is not being triggered on cancel.

 

After some investigation I have not found a clean way to do this. All I could come up with was 'hacking' the scheduler and checking e.slot in my moveEnd eventHandler (e.slot undefined => cancel).

 

Is there a clean way to do this?

 

kendo.ui.Scheduler.fn._movable = function (movable) {
    return function () {
        var that = this;
 
        movable.call(this);
 
        this._moveDraggable.bind('dragcancel', function () {
            that.trigger('moveEnd');
        });
    };
}(kendo.ui.Scheduler.fn._movable);
Ivan Danchev
Telerik team
 answered on 23 Dec 2016
3 answers
999 views

Hello, i would like to make list to fill its data from an URL, but I am not able to do that, i tried to follow documentation but I have only found example of loading local data.

That is working, but i would like to use ajax datasource, http://dojo.telerik.com/@andrea/uvanE

That is the json data that correspond to the execution of the MVC controller I have server side: http://dojo.telerik.com/@andrea/uvanE/2

that is my try to use the remote data http://dojo.telerik.com/@andrea/uvanE/3

the json data have been generated by the following server code, and i do not know if it is in the correct format that the list expect

[Authorize]
        [HttpPost]
        public ActionResult GetShippers([DataSourceRequest] DataSourceRequest request)
        {
            
            return Json(new string[] { "A", "B", "C" }.ToDataSourceResult(request));
        }
Andrea
Top achievements
Rank 1
 answered on 23 Dec 2016
2 answers
1.1K+ views

Hey there,

I'm using the Dialog widget and want to prevent the close button from changing the `window.location`.

So I use the following code to achieve it:

01.dialogConfig = {
02. 
03.    // ...
04. 
05.    close: function(e) {
06.      console.log("close clicked");
07.      e.preventDefault(true);
08.  }
09.}

I ran the code in the debugger and the preventDefault() call is indeed fired. Still, the window.location changes to '#' which changes the route in my Angular web app.

Any help appreciated.

Thanks & Cheers,

Constantin

 

Constantin
Top achievements
Rank 1
 answered on 23 Dec 2016
1 answer
753 views

Hi,

In my scheduler i am performing database  update while i click on save button on event popup.

it is updating scheduler database using stored procedure.

but after that event i cant see the updated data on scheduler.

e.g. in my case when i click save button on event, it create one more task in database. but i cant see the new task on scheduler after save completed.

how to update the scheduler data after Save event.

Thanks

Siddhartha

Nencho
Telerik team
 answered on 23 Dec 2016
3 answers
388 views

Hi, 

I am facing an issue with the DateTimePicker where the time in the selection box is appearing up twice.Attached is the image. 

The code that I have done for round off and for setting the max value is below, please let me know where i am going wrong.

Code snippet - 

var currentDate = new Date();
   currentDate.setDate(currentDate.getDate() - 28);
   currentDate.setMinutes(0);
   var startDateTimeElement = $("#start_dateTime");
   startDateTimeElement.kendoDateTimePicker({
       value: currentDate,
       format: "dd/MM/yyyy hh:mm tt",
       culture: "en-GB"
   });
 
   var endDateTimeElement = $("#end_dateTime");
   var endDate = new Date();
   //--rounding off the time to the nearest half an hour
   var mins = endDate.getMinutes();
   var quarterHours = Math.round(mins / 60);
   if (quarterHours === 2) {
       endDate.setHours(endDate.getHours() + 1);
   }
   var rounded = (quarterHours * 60) % 60;
   endDate.setMinutes(rounded);
   //--
 
   endDateTimeElement.kendoDateTimePicker({
       value: endDate,
       format: "dd/MM/yyyy hh:mm tt",
       culture: "en-GB"
   });
 
   startDateTimeElement.kendoDateTimePicker({
       format: "dd/MM/yyyy hh:mm tt",
       culture: "en-GB",
       min: currentDate,
       max: endDateTimeElement.data("kendoDateTimePicker").value(),
       change: function () {
           var selectedDate = startDateTimeElement.data("kendoDateTimePicker").value();
           endDateTimeElement.data("kendoDateTimePicker").min(selectedDate);
       }
   });
 
   endDateTimeElement.kendoDateTimePicker({
       format: "dd/MM/yyyy hh:mm tt",
       culture: "en-GB",
       min: startDateTimeElement.data("kendoDateTimePicker").value(),
       max: endDate,
       change: function () {
           var selectedDate = endDateTimeElement.data("kendoDateTimePicker").value();
           startDateTimeElement.data("kendoDateTimePicker").max(selectedDate);
       }
   });

 

Aditya
Top achievements
Rank 1
 answered on 23 Dec 2016
1 answer
1.4K+ views

I have a Kendo UI Spreadsheet. How do I get the rows count of latest added rows? Say the spreadsheet is empty, I have added data for 2 rows. How do I get the row count. I am using, 

var grid = $("#spreadsheet").data("kendoSpreadsheet");
       var sheet = grid.sheetByIndex(0);
       var data = sheet.toJSON();
       var totalRowsCount = data.rows.length;

Here, the totalRowsCount does not always get data rows count and gets total rows that I have defined for my kendo spreadsheet. 

Stefan
Telerik team
 answered on 23 Dec 2016
1 answer
166 views

Hello,

We are experiencing high memory usage when using Directives in the grid's column templates.

Due to our business requirement, we have two grids on one page that each contain around 10 columns. There is a lot of different functionality between the grids so the column templates can be pretty complicated (icons for context menus, multiple line content, links..).

In order to implement these features, we thought it would be a good idea to use angular js directives in the kendo grid (using the angular js initialization of the grid of course). We could then proceed to test these directives using jasmine and even import these directives into grids in other pages.

We recently noticed, however, that this uses too much memory (about 450 MB with one grid having 20 rows and the other 120). Each single cell becomes a directive with its own child scope.

Is there any way that you'd recommend for us to create one directive for the entire column not individual cells? Or at least lower the memory usage?

Thank you.

Stefan
Telerik team
 answered on 23 Dec 2016
2 answers
249 views

We are using TreeView which is configured as "loadOnDemand: true" and have checkbox nodes.

In our use case, we need to progmatically select (ticking) matching nodes (which may be present deep inside the hierarchy).

When we try to expand the node, having progmatically ticked nodes which have not loaded earlier, the checkbox selection is getting lost.

http://dojo.telerik.com/@ksingh269/EtaQE

In the above example, on selection of node "Kendo UI Project", another node "Reports>February.pdf" is progmatically ticked. Now when we try to expand node "Reports", the selection is lost.

We are upgrading version from 2015.1 318 to 2016.3.1118 and our project gone through regression cycle. Won;t be possible to move to new build.

Please suggest work around.

I appears to have lost behavior at 2015.3.1111.

Piyush
Top achievements
Rank 1
 answered on 23 Dec 2016
3 answers
160 views

Hello Team,

I am passing a date object as data source in kendoChart, e.g : { value: 30, date: new Date("Fri Dec 09 2016 10:00:00 GMT+0530 (India Standard Time)") }

When I am giving baseUnit: hours, I am expecting chart to reflect 10:00 on x axis but its giving me half an hour less than the expected one which is 9:30.

Same happens with all the date format I pass as DataSource.

For reference I am attaching a html file, you just have to select hours radio button.

 

Thanks

Iliana Dyankova
Telerik team
 answered on 22 Dec 2016
4 answers
231 views

During testing of a system that uses Mondrian to create database cubes and KendoUI to generate dynamic MDX queries, it seems a cube using "CalculatedMember" is interpreted by KendoUI as "KPI". This is then listed as an item in "FIELDS". However, when clicking on this item, it is stuck in eternal loading while Mondrian logs an error for the query:

 

ERROR XMLAParser:113 - Method : XMLAResponseParser.parseFaultyResponse(String xmlaResponse), Mondrian Error : The Mondrian XML: No enum constant mondrian.xmla.RowsetDefinition.MDSCHEMA_KPIS
ERROR XmlaServlet:324 - Errors when handling XML/A message
mondrian.xmla.XmlaException: Mondrian Error:XMLA SOAP Body processing error
at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:511)
at mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:318)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at com.utel.stinga.spa.analytics.server.XmlaRequestFilter.doFilter(XmlaRequestFilter.java:119)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: No enum constant mondrian.xmla.RowsetDefinition.MDSCHEMA_KPIS
at java.lang.Enum.valueOf(Enum.java:236)
at mondrian.xmla.RowsetDefinition.valueOf(RowsetDefinition.java:54)
at mondrian.xmla.XmlaHandler.discover(XmlaHandler.java:2857)
at mondrian.xmla.XmlaHandler.process(XmlaHandler.java:671)
at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:507)
... 20 more

 

It seems Mondrian does not accept MDSCHEMA_KPIS. During further debugging, it seems KendoUI indeed sends this RequestType "MDSSCHEMA_KPIS":

 

Request Payload:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis"><RequestType>MDSCHEMA_KPIS</RequestType><Restrictions><RestrictionList><CATALOG_NAME>LTE</CATALOG_NAME><CUBE_NAME>LTE_10000</CUBE_NAME></RestrictionList></Restrictions><Properties><PropertyList><Catalog>LTE</Catalog></PropertyList></Properties></Discover></Body></Envelope>

 

Why do KendoUI interpret CalculatedMember as KPI? Why does KendoUI send request for MDSCHEMA_KPIS to Mondrian when this is not accepted?

S
Top achievements
Rank 1
 answered on 22 Dec 2016
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?