Telerik Forums
Kendo UI for jQuery Forum
1 answer
638 views
Hello I have a treeview where I have added a integer Id as a hmtlattribute.  This is a MVC4 Kendo UI project.

branch.Add().Text("Item " + child).HtmlAttributes(new { data_foo = childs.MyId })

I am trying to access it from a button click event when a node is selected to pass foo to another view.

$("#btn").click(function () {
        var treeview = $("#treeview").data("kendoTreeView");
        var treeSelect = treeview.select();
        var passId = treeSelect.attr("foo");
        window.location = "@Url.Action("Index","Content")" + "?MyIntegerParameter=" + passId;*
});

Here is the element from Chrome

<li class="k-item" data-foo="30" data-uid="7f3430d0-4b01-4b08-b4be-1264d3ff16d3" role="treeitem" aria-selected="true" id="treeview_tv_active">
    <div class="k-top">
        <span class="k-in k-state-selected">This Is The Text</span>
    </div>
</li>

How can I access this from the button click and send it in the Action?
Dimiter Madjarov
Telerik team
 answered on 11 Nov 2013
9 answers
247 views
Hi,

Can someone guide me to resolve following issue/bug.

http://eesea.antheminfotech.net/countries

Upload button: (Countries, Location type and Terminal type)
a.      In any of the page, click new
b.      Click upload and choose any image
c.      Click cancel
d.      Bug: The upload button turns blue and remains so.

Dimiter Madjarov
Telerik team
 answered on 11 Nov 2013
3 answers
149 views
The error thrown is: Uncaught TypeError: Cannot call method 'closest' of undefined.
I have created a simple app to reproduce the behavior.

Attached is the full project with kendo and jQuery dependencies, but I am including the source for search relevance.

index.html
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!-- Kendo UI Mobile CSS -->
        <link href="styles/kendo.common.min.css" rel="stylesheet" />
        <link href="styles/kendo.default.min.css" rel="stylesheet" />
        <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" />
 
        <!-- jQuery JavaScript -->
        <script src="js/lib/jquery/jquery.min.js"></script>
 
        <!-- Kendo UI Mobile combined JavaScript -->
        <script src="js/lib/kendo/kendo.all.js"></script>       
    </head>
    <body>
        <div data-role="layout" data-id="myLayout">
            <div data-role="header">
                <div data-role="navbar">
                    <a id="btnBack" class="nav-button" data-align="left" data-role="backbutton">Back</a>
                    <span data-role="view-title"></span>
                    <a id="btnOK" class="nav-button" data-align="right" data-role="button" href="page2.html">Next</a>
                </div>
            </div>
        </div>
 
        <div data-role="view" data-title="Test App" data-layout="myLayout">
            Welcome to the app
        </div>
 
        <script>
            var app = new kendo.mobile.Application(document.body,
                    {
                        transition: 'slide'
                    });
        </script>
    </body>
</html>
page2.html
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <script src="js/app/page2.js"></script>
        <div data-role="view" data-layout="myLayout" data-model="p2Model" data-reload="true">
            <ul data-role="listview" data-template="listItem" data-bind="source: dsList"></ul>
        </div>
 
 
        <script id="listItem" type="text/x-kendo-template">
            #: FirstName # #: LastName #
        </script>
    </body>
</html>

js/app/page2.js
var p2Model;
if (p2Model == null)
{
    p2Model = kendo.observable({
        dsList: new kendo.data.DataSource({
            data: [{id: 1, FirstName: "Bilbo", LastName: "Baggins"}, {id: 2, FirstName: "Malcolm", LastName: "Reynolds"}]
        })
    });
}

I set the reload="true" attribute on the root view in page2.html because my desire is to have the page refresh with changes made to the underlying model (p2Model) as well as update the datasource's data. When page2 is visited the first time, everything works as expected. But if you hit the back button in the app,  and then visit page2 again, the error is thrown.
What is interesting to note is that if the singleton behavior of the p2Model is removed and it is reconstructed on each page2 visit, then it also works as expected.
However, I desire to have some persistent attributes of the p2Model that could be set while visiting page2 and would not be lost when the page is revisited.
Ideally I could use something like a requireJS module for this, but I have not seen any examples on how to leverage it with remote views.

Are there any examples or best practices on how to leverage modular javascript in remote views? In the Kendo Music Store tutorial it seems to imply that Kendo will automatically load the .js module with the same name as a view (http://docs.kendoui.com/tutorials/Mobile/Kendo%20Mobile%20Music%20Store/kendo-mobile-music-store-organization#js-file-per-view) but I have not observed this working with a remote view like page2.html. Or perhaps my understanding of requireJS is incorrect.

Thanks
Petyo
Telerik team
 answered on 11 Nov 2013
1 answer
143 views
Hi, 

On the demo page for stock chart, I see the values of ohlc values with .2 digit precision. eg: 73.84, 74.56... How can I change that sample to show values in 4 digit precision. eg: 73.8400, 74.5697...

Thanks in advance,
Iliana Dyankova
Telerik team
 answered on 11 Nov 2013
1 answer
523 views
1) Is there a way to default to "Business Hours"?

2) Could we maybe get some sort of notification or SOMETHING that there might be events hidden in the collapsed area?  Like if my business hours are 9-5, but the event is at 6...user is totally unaware.

Rosen
Telerik team
 answered on 11 Nov 2013
1 answer
161 views
using this way to load kendo datepicker:
<input data-bind="kendoDatePicker: { value: myDate}" class="k-widget" />

Doing this, it loads only the textbox with a side icon - clicking on icon doesn't open the date/calendar. Any particular reason ??
Alexander Valchev
Telerik team
 answered on 11 Nov 2013
1 answer
360 views
dear sir,

i'm new to scheduler and i want the scheduler will block some date,time slot  based on the date-time from back-end table
and here we did not allowed  to insert or update the data on that particular slot 


please give the worked JSBin sample for the above thread

like the image below



thanks & regards

-santhosh.B
Georgi Krustev
Telerik team
 answered on 11 Nov 2013
5 answers
532 views
Hello,

We experience a script error randomly when moving events with drag and drop within the scheduler.
The Visual explanation is that the event we have started to move - dont "release" from the mouse and are stuck with the cursor. As you can see in the attached file, the problem occur in the kendo.web.min.js library.

The current configuration run on Win 8.1 , IE11 and on the kendoui.complete.2013.2.918.commercial release.

Our datasource:
  dataSource = new kendo.data.SchedulerDataSource({
        sync: function () {
            this.read();
        },
        batch: true,
        transport: {
            read: {
                url: m_serverUrl + "/ActivityPointerSet",
                dataType: 'json'
            },
            parameterMap: function (options) {
                var parameter = {
                    $filter: filterstring,
                    $select: 'ActivityTypeCode,ActivityId,Subject,ScheduledEnd,ScheduledStart,StatusCode,OwnerId'
                };
 
                return parameter;
            }
 
        },
        schema: {
            model: {
                id: "ActivityId",
                fields: {
                    taskId: { from: "ActivityId" },
                    title: { from: "Subject", defaultValue: "No title", validation: { required: true} },
                    start: { type: "date", from: "ScheduledStart" },
                    end: { type: "date", from: "ScheduledEnd" },
                    //startTimezone: { from: "StartTimezone" },
                    //endTimezone: { from: "EndTimezone" },
                    StatusCode: { from: "StatusCode" },
                    roomId: { from: "ActivityTypeCode" },
                    description: { from: "StatusCode" },
                    recurrenceId: { from: "RecurrenceID" },
                    recurrenceRule: { from: "RecurrenceRule" },
                    recurrenceException: { from: "RecurrenceException" },
                    ownerId: { from: "OwnerId", defaultValue: 1 },
                    isAllDay: { type: "boolean", defaultValue: false }
                }
            },
            parse: function (data) {
                return data.d.results;
            },
            type: "json"
        },
        serverSorting: true,
        serverFiltering: true
    });
 
    return dataSource;
}


The Scheduler initialisation method
function ISV_Abs_InitKendoScheduler() {
    var datasource = ISV_Abs_GetSchedulerDataSource();
 
    $("#scheduler").kendoScheduler({
        date: new Date(),
        editable: {
            confirmation: "Are you sure you want to delete this Sales Call?"
        },
        startTime: new Date("2013/6/13 07:00 AM"),
        navigate: scheduler_navigate,
        remove: scheduler_remove,
        resizeStart: scheduler_resizestart,
        save: scheduler_save,
        moveStart: scheduler_movestart,
        views: [
                "day",
                    { type: "week", selected: true },
                    "month",
                    "agenda"
                ],
        edit: function (e) {
            Xrm.Utility.openEntityForm(e.event.roomId, e.event.taskId, null);
            e.preventDefault();
            return false;
        },
        dataSource: dataSource,
        resources: [
                {
                    field: "roomId",
                    dataSource: [
                        { text: "Sales Call", value: "abs_salescall", color: "#7ea700" },
                        { text: "Appointment", value: "appointment", color: "#0094E5" }
                    ],
                    title: "Activity Type"
                }]
    });
}

function scheduler_movestart(e) {
    if (e.event.description.Value == 2 || e.event.description.Value == 3) {
        alert("Cannot update a canceled or completed Activity");
        e.preventDefault();
        return false;
    }
}

I very happy for any help on this mather.

Best Regards
Support
Top achievements
Rank 1
 answered on 11 Nov 2013
1 answer
121 views
Hello,
is it possible to configure Kendo UI Mobile that the navigation bar on iOS devices is not overlayed at the top?
It should look like the same how it is displayed in Android.

Thank you guys!

Martin
Kiril Nikolov
Telerik team
 answered on 11 Nov 2013
3 answers
63 views
Hello,

I've noticed an issue with the filtering functionality of Date fields in the Kendo Grid. This behavior can be observed when viewing the grid demo: http://demos.kendoui.com/web/grid/remote-data.html

The sample data here has 7/3/1996 as the Order Date of the first record in the grid. If I attempt to filter the records for all orders on this date ("Is equal to" 7/3/1996), nothing appears. I would expect that at least this first record would remain. If I attempt to filter the records for all orders on 7/4/1996, the only record that appears is the first record with an order date of 7/3/1996, which is also not expected. I would expect that the second record with an order date of 7/4/1996 would appear. Similar issues occur when using the other filter types ("Is after", "Is before", etc.).

Is the dev team at Telerik aware of this issue? And is there a workaround for this short of implementing my own custom filter?

Thanks!
Geoff
Kiril Nikolov
Telerik team
 answered on 11 Nov 2013
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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?