Telerik Forums
Kendo UI for jQuery Forum
2 answers
261 views

Hi,

I am looking for, selecting multi events on   across the time/days and move into  new time/days.

Any suggestions pls.

Cheers.

 

A Joy
Top achievements
Rank 1
 answered on 28 Nov 2016
3 answers
916 views
Hi ,

I want to implement org chart functionality (present in Rad Controls for ASP.NET) in MVC using Kendo. Please suggest me how to work on it?

Thank You
Prashant Gupta
Iliana Dyankova
Telerik team
 answered on 28 Nov 2016
1 answer
187 views

I currently have the following template

 

    <script id="tmplOptionsMenuItemRowAll" type="text/x-kendo-tmpl" >
        <div>#:uid#</div>
        <div class="col-xs-12"
            data-role="listview"
            data-template="tmplOptionsMenuItemRowAll"
            data-bind="source: allMenuItems"
            data-selectable="false"
            id="kendoLVOptionsAllMenuItems">
        </div>
    </script>

 

I am trying to manually calculate the HTML and then inserting it somewhere in the DOM (its a long story)

I currently call the following code to do this:

               var templateContent = $(options.templateId).html();

                var template = kendo.template(templateContent);
                //now resolve the HTML
                var result = kendo.render(template, [options.appModel]); //render the template
                return result;

 

However when I look at 'result' I can see that the UID has been correctly resolve BUT the list view has not been executed at all. Am I missing something?

Alon
Top achievements
Rank 1
Veteran
 answered on 28 Nov 2016
2 answers
427 views

We are generating a PDF form in Finnish language. We are having problems with scandic letters (åäö) not rendering correctly in the PDF. They are on top of each other. Is this a problem with Telerik PDF export or the font? Are there workarounds? I tried another font (Fira Sans) and the results are the same.

The attached files show how it looks in the DOM and in the generated PDF.

 

Jussi
Top achievements
Rank 1
 answered on 28 Nov 2016
1 answer
278 views
Having Hierarchy grid, trying to add custom client template with <a href> and item with it. But, don't know how can i get child item. For ex. on parent grid i'm getting item like: 

    .Columns(columns =>
              {
                  columns.Template(e => { }).ClientTemplate("<strong><a  href='" + Url.Action("Details", "Types") + "#= Id #'> #= Name #  </a></strong>").Title("Type Name").Width("30%");

How can I make this the same for child grid? 

    .Name("grid_#=Id#")
                .Columns(columns =>
                {
                    columns.Bound(e => e.Name).Title("SubType Name").ClientTemplate("<a href='" + Url.Action("Details", "Types") + "#= e.data.Id #'>#= e.data.Name #</a>");

If I will use like: `#= data.Name #` it will display parent data.
Eyup
Telerik team
 answered on 28 Nov 2016
1 answer
1.2K+ views

Hello,

The grid loads remote data at setup without any problems. However, in a button click event, I set the same url as source, like this:

1.$("#budgetGrid").data("kendoGrid").setDataSource({
2.  transport: {
3.    read: loadURL,
4.  },
5.});

 

And I get this error:

1.kendo.all.js:45851 Uncaught TypeError: e.fetch is not a function(…)
2.setDataSource @ kendo.all.js:45851
3.click @ Default.aspx?uid=6674:213
4.trigger @ kendo.all.js:124
5._click @ kendo.all.js:26017
6.d @ jquery.min.js:2
7.dispatch @ jquery.min.js:3
8.r.handle @ jquery.min.js:3

I've compared the output of the remote method and it's the same.

Thank you for any pointer.

Alex Hajigeorgieva
Telerik team
 answered on 28 Nov 2016
3 answers
322 views

As per the title, the KendoEditor "Change" event doesn't fire when insert link box actually inserts the link.

It gets fired if the focus changes afterward though... even if you click the start button.

You can actually see this in the KendoUI demonstration page: http://demos.telerik.com/kendo-ui/editor/events

 

The problem with this is if you need to enable a save button so they can save the changes, they have to click somewhere first.

Rumen
Telerik team
 answered on 25 Nov 2016
1 answer
492 views

I'm using angular. In my column field, i have:

                        filterable: {
                            ui: function (element) {
                                $scope.multiSelectFilter(element, "weekdays")
                            }
                        }

This is making use of "currying" technique I believe. In the multiSelectFilter function, I determine the distinct list of values for this column based on the datasource, and push them into the ddataSource.filter() options. This produces the correct distinct values for the multiSelect dropdown in the filter area.

When a new dataSource.read() takes place, in my case because a new HTTP call is being made, the new results populate the grid as expected.

The issue is that the column filterable (above code) is not re-run with the new data, so the filter drop-down doesn't reflect the new datasource data. I did read that this is intentional, only running n the initial grid load to be more efficient.

EXAMPLE: Let's say my table I'm hitting the http call for is a table of all of my events on my calendar. LEt's say the initial call passes in an argument to the request for only events labeled "birthdays". Let's say we get 3 results - one on Monday, one on Tuesday, one Wednesday. Cool beans. Now I make an additional call to my service that returns all of my events of all kinds - resulting on having events on every day of the week at some point or another. I go to the weekdays dropdown, and only >monday,tuesday,wednesday" options are displayed. This is my problem.\

I'd prefer not to have to destroy and then recreate the grid just for the sake of reapplying the drop-down filters correctly. I've played around with filterMenuInit, but the problem I'm having is that I still need to pass the specific field name like I am above - and now just for this one column, but for multiple, and I don't think I can access the element's field name in the filterMenuInit without potentially using Jquery.

My other thought was trying to use the change: event but ran into the same issue.

Looking for the most efficient solution (not involving Jquery).

Rosen
Telerik team
 answered on 25 Nov 2016
3 answers
182 views

We are trying to implement a feature where view backgrounds can be dynamic, once a user has logged in the background URLs for the various views will be loaded from the server.  This gives us the ability to provide "fresh" and/or "seasonal" background images to the views.  One problem that we keep running into is that when the drawer is opened and then closed, any explicitly set "background-image" property that's not defined via CSS gets wiped out.  Is there any way around the behavior shown by opening and then closing the menu within this Dojo?

http://dojo.telerik.com/@artie.cs/uraNOJ

We are trying to avoid having to rework the view contents to add child elements to all of the views we already have in place, we just want to understand why the drawer behaves this way. 

 

 

Iliana Dyankova
Telerik team
 answered on 25 Nov 2016
2 answers
394 views

Hello Kendo Team,

I'm trying to implement the Grid / Export to Excel feature in Kendo grid, but I can't make it work, here is my js code, hope you can find what I am missing,

(Line 045)

Thanks in advance! 

001.var NoFoundMessage = $("#NoFoundMessage");
002.var Kendogrid = $("#grid");
003.var isOrderById = false;
004.(function (MyOrders, $) {
005. 
006.    MyOrders.OrderHistory = (function () {
007. 
008.        var load = function (isLoadingMore) {
009.            kendo.ui.progress(Kendogrid, true);
010.            Kendogrid.kendoGrid({
011.                noRecords: true,
012.                dataSource: {
013.                    type: "POST",
014.                    transport: {
015.                        read: function (options) {
016.                            if (isOrderById === false) {
017.                                getOrdersDataSource(myOrders.SearchControl.pagingSearch(), options);
018.                            }
019.                            else {
020.                                getOrderByIdDataSource(localStorage.OrderID, options);
021.                                isOrderById = false;
022.                            }
023.                        }
024.                    },
025.                    batch: true,
026.                    schema: {
027.                        type: 'json',
028.                        model: {
029.                            id: "OrderID",
030.                            fields: {
031.                                OrderID: { type: "string" },
032.                                PurchasedBy: { type: "string" },
033.                                ReceivedDate: { type: "date" },
034.                                OrderStatusDesc: { type: "string" },
035.                                HAPOrderStatus: { type: "string" },
036.                                OrderPurpose: { type: "string" },
037.                                PurchaserName: { type: "string" },
038.                                Recipient: { type: "string" },
039.                                VolumePoints: { type: "string" },
040.                                OrderAgain: { type: "string" },
041.                                ViewReceipt: { type: "string" }
042.                            }
043.                        }
044.                    },
045.                    toolbar: ["excel"],
046.                    excel: {
047.                        fileName: "MyOrders.xlsx",
048.                        //proxyURL: "//demos.telerik.com/kendo-ui/service/export",
049.                        filterable: true,
050.                        allPages: true
051.                    },
052.                    pageSize: 10
053.                },
054.                groupable: false,
055.                sortable: true,
056.                dataBound: onDataBound,
057.                pageable: {
058.                    refresh: false,
059.                    pageSizes: true,
060.                    buttonCount: 10
061.                },
062.                columns: [{
063.                    field: "OrderID",
064.                    title: "ORDER #",
065.                    template: function (data) {
066.                        var url = getUrlWithLocale("/Account/OrderHistory/GetOrderDetails/");
067.                        return "<a id='btnViewDetails' data-orderID='" + data.OrderID + "' href='" + url + data.OrderID + "/Ds'>" + data.OrderID + "</a>";
068.                    }
069.                },
070.                {
071.                    field: "PurchasedBy",
072.                    title: "P/S/Q"
073.                }, {
074.                    field: "ReceivedDate",
075.                    title: "DATE",
076.                    template: function (data) {
077.                        return data.ReceivedDate.toLocaleDateString();
078.                    }
079.                }, {
080.                    field: "OrderStatusDesc",
081.                    title: "STATUS",
082.                    template: function (data) {
083.                        if (data.OrderStatusDesc === 'ORDER COMPLETE') {
084.                            return "<span class='complete'>" + data.OrderStatusDesc + "</span>";
085.                        }
086.                        else if (data.OrderStatusDesc === "CANCELLED") {
087.                            return "<span class='cancelled'>" + data.OrderStatusDesc + "</span>";
088.                        }
089.                        else {
090.                            return "<span class='processing'>" + data.OrderStatusDesc + "</span>";
091.                        }
092.                    },
093.                },
094.                {
095.                    field: "HapOrderStatus",
096.                    title: "STATUS",
097.                    hidden: true,
098.                    template: function (data) {
099.                        if (data.HapOrderStatus === "ACTIVE") {
100.                            return "<span class='complete'>" + data.HapOrderStatus + "<span>";
101.                        }
102.                        else if (data.HapOrderStatus === "CANCELLED") {
103.                            return "<span class='cancelled'>" + data.HapOrderStatus + "<span>";
104.                        }
105.                        else {
106.                            return "<span class='processing'>" + data.HapOrderStatus + "<span>";
107.                        }
108.                    }
109.                },
110.                {
111.                    field: "OrderPurpose",
112.                    title: "ORDER PURPOSE"
113.                },
114.                {
115.                    field: "PurchaserName",
116.                    title: "PURCHASER",
117.                    attributes: {
118.                        "class": "tablet"
119.                    },
120.                    template: "#:PurchaserInfo.PurchaserName#"
121.                },
122.                {
123.                    field: "Recipient",
124.                    title: "SHIP TO",
125.                    attributes: {
126.                        "class": "tablet"
127.                    },
128.                    template: "#:Shipment.Recipient#"
129.                },
130.                {
131.                    field: "VolumePoints",
132.                    title: "VOLUME",
133.                    template: "#:Pricing.VolumePoints#"
134.                },
135.                {
136.                    field: "Order Again",
137.                    title: "ORDER AGAIN",
138.                    template: (function () {
139.                        var url = getUrlWithLocale("/Shop/Cart/Copy/Index/");
140.                        if (myOrders.SearchControl.pagingSearch().IsHapOrder === false) {
141.                            return "<a class='icon-files-ln-3' href='" + url + "#:OrderID#/Ds'> </a>";
142.                        }
143.                        return "";
144.                    }())
145.                },
146.                {
147.                    field: "ViewReceipt",
148.                    title: "VIEW RECEIPT",
149.                    template: "<a href='javascript:void();'><i class='icon-receipt-ln-4'></i></a>",
150.                }]
151.            });
152.            $(Kendogrid).kendoPager({
153.                messages: { itemsPerPage: "results per page" }
154.            });
155.        }
156.        var getUrlWithLocale = function (url) {
157.            var pathArray = window.location.pathname.split('/');
158.            var segment = pathArray[1];
159.            var regex = /^([a-zA-Z]{2}-[a-zA-Z]{2})$/;
160. 
161.            if (regex.test(segment)) {
162.                return "/" + segment + url;
163.            }
164.            return url;
165.        }
166.        var searchByOrderId = function (orderId) {
167.            localStorage.searchByOrderId = true;
168.            isOrderById = true;
169.            localStorage.OrderID = orderId;
170.            load(false);
171.        }
172.        function getOrdersDataSource(data, options) {
173.            $.ajax({
174.                url: getUrlWithLocale("/Account/OrderInquiry/GetOrders"),
175.                data: data,
176.                dataType: "json",
177.                success: function (result) {
178.                    if (result == null) {
179.                        noFound();
180.                    }
181.                    else {
182.                        showGrid();
183.                    }
184.                    kendo.ui.progress(Kendogrid, false);
185.                    options.success(result);
186.                }
187.            });
188.        }
189.        function getOrderByIdDataSource(orderId, options) {
190.            $.ajax({
191.                url: getUrlWithLocale("/Account/OrderInquiry/GetOrderById"),
192.                data: { orderId: orderId },
193.                dataType: "json",
194.                success: function (result) {
195.                    if (result == null) {
196.                        noFound();
197.                    }
198.                    else {
199.                        showGrid();
200.                    }
201.                    kendo.ui.progress(Kendogrid, false);
202.                    options.success(result);
203.                }
204.            });
205.        }
206.        function noFound() {
207.            Kendogrid.hide();
208.            NoFoundMessage.show();
209.        }
210.        function showGrid() {
211.            NoFoundMessage.hide();
212.            Kendogrid.css("display", "block");
213.        };
214.        function formatColumns() {
215.            var grid = Kendogrid.data("kendoGrid");
216.            if (myOrders.SearchControl.pagingSearch().IsHapOrder === true) {
217.                grid.hideColumn("Recipient");
218.                grid.hideColumn("Order Again");
219.                grid.hideColumn("ViewReceipt");
220.                grid.hideColumn("OrderStatusDesc");
221.                grid.hideColumn("PurchasedBy");
222.                grid.hideColumn("PurchaserName");
223.                grid.showColumn("HapOrderStatus");
224. 
225.                $("#grid thead [data-field=ReceivedDate] .k-link").html("Start Date");
226.            }
227.            else {
228.                grid.showColumn("Recipient");
229.                grid.showColumn("Order Again");
230.                grid.showColumn("View Receipt");
231.                grid.showColumn("OrderStatusDesc");
232.                grid.showColumn("PurchasedBy");
233.                grid.showColumn("PurchaserName");
234.                grid.hideColumn("HapOrderStatus");
235. 
236.                $("#grid thead [data-field=ReceivedDate] .k-link").html("Date");
237.            }
238.        }
239. 
240.        function onDataBound(arg) {
241.            var grid = Kendogrid.data("kendoGrid");
242.            if (myOrders.SearchControl.pagingSearch().IsHapOrder === true) {
243.                grid.hideColumn("Recipient");
244.                grid.hideColumn("Order Again");
245.                grid.hideColumn("ViewReceipt");
246.                grid.hideColumn("OrderStatusDesc");
247.                grid.hideColumn("PurchasedBy");
248.                grid.hideColumn("PurchaserName");
249.                grid.showColumn("HapOrderStatus");
250. 
251.                $("#grid thead [data-field=ReceivedDate] .k-link").html("Start Date");
252.            }
253.            else {
254.                grid.showColumn("Recipient");
255.                $("th[data-field='Recipient']").show();
256.                grid.showColumn("OrderAgain");
257.                $("th[data-field='Order Again']").show();
258.                grid.showColumn("ViewReceipt");
259.                $("th[data-field='ViewReceipt']").show();
260.                grid.showColumn("OrderStatusDesc");
261.                $("th[data-field='OrderStatusDesc']").show();
262.                grid.showColumn("PurchasedBy");
263.                $("th[data-field='PurchasedBy']").show();
264.                grid.showColumn("PurchaserName");
265.                $("th[data-field='PurchaserName']").show();
266.                grid.hideColumn("HapOrderStatus");
267.                $("th[data-field='HapOrderStatus']").hide();
268.                $("#grid thead [data-field=ReceivedDate] .k-link").html("Date");
269.            }
270.        }
271.        return {
272.            load: load,
273.            gerUrlWithLocale: getUrlWithLocale,
274.            searchByOrderId: searchByOrderId
275.        };
276.    }())
277. 
278.})(window.myOrders = window.myOrders || {}, jQuery);
279. 
280.$(document).ready(function () {
281. 
282.    myOrders.OrderHistory.load(false);
283. 
284.    $("#show-form").click(function () {
285.        clearErrors();
286.        $("#search-form").slideToggle();
287.        $(this).find("i").toggleClass("icon-arrow-circle-ln-29 icon-arrow-circle-ln-30");
288.    });
289. 
290.});
Alex Hajigeorgieva
Telerik team
 answered on 25 Nov 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?