Telerik Forums
Kendo UI for jQuery Forum
1 answer
95 views
How do I scroll to top, in a pane in a split view, from javascript?

I have tried several hours with different things but cant get it to work.

Thanks
Alexander Valchev
Telerik team
 answered on 19 Mar 2013
2 answers
343 views
Hi

I've got the URL below which always returns a single record.  How do I return the Content field and update the html of a div on the page?

http://dsdmservices.azurewebsites.net/dsdmRest.svc/GetContent?BookMenuID=4

Returns:
{"BookMenuID":4,"Content":"<span>DSDM advocates........"}

I've tried the code below so far (amongst many others) but the alert shows "undefined" as the result...
var dataSource = new kendo.data.DataSource({
                        transport: {
                            read: {
                                url: "http://dsdmservices.azurewebsites.net/dsdmRest.svc/GetContent?BookMenuID=4", // the remove service url
                                dataType: "jsonp" // JSONP (JSON with padding) is required for cross-domain AJAX
                                  }
                            }               
                        });
               
            dataSource.read();
             
            alert(dataSource.length);
             
            var dataItem = dataSource[0];
            $('#divContent').html(dataItem.Content);


Cheers
Cliff
Cliff Gibson
Top achievements
Rank 1
 answered on 19 Mar 2013
1 answer
210 views
Just a note for your documentation team, and a bug report.

kendo.ns 

Is documented extremely briefly in the declarative syntax section of your online docs, the gist of the docs go like this:

set kendo.ns e.g.

kendo.ns = "kendo" 

This would change your data declarations to : data-kendo-role= (etc.)

This is not correct (as per the latest code drop) setting...

kendo.ns = "kendo" 

Recognizes data attributes in the following form...

data-kendorole=

You can set kendo.ns="kendo-" and then be able to use data attributes in the form

data-kendo-role

However, even with enough data attributes recognised to get the app to start, large chunks of declarative markup simply don't work anymore. (As a very basic example, layouts don't recognise data-kendo-header / data-kendo-footer ... there's many more problems with it.)

Switching off kendo.ns and renaming data- attributes back to their non ns'ed form fixes everything.

Where is your issue tracking system, or do you guys pull bug reports in from here?

Jason.
Fishvision.
Petyo
Telerik team
 answered on 19 Mar 2013
3 answers
238 views
Hi,

<a data-role="button"   data-click="onClick" >Open</a>

<ul data-role="actionsheet" id="actionsheet">
   <li><a data-action="foo">Foo</a></li>
   <li><a data-action="bar">Bar</a></li>
</ul>

function onClick(){
      
        if(i>5)
        {
        // I want to open above action sheet here if condition satisfy, 
        }
        else
        {
        alert("Cannot open action sheet");
        }
       } 

I want to open the actionsheet on the click of button.
After clicking button, onclick function is invoking where i am doing some condition checking.If condition satisfy i want to open action sheet.

Please do the needful.If possible please provide demo in JS Bin
Alexander Valchev
Telerik team
 answered on 19 Mar 2013
3 answers
167 views
The date/month picker animation is just horrible in some browser/video card setups.  What's worse is I'm so embarrassed when my customers see demos of our large enterprise-level apps.  I don't have anything to tell them other than Telerik won't let us turn them off.  Yes, we could use custom cell editors everywhere, but what a productivity killer...we have tons of grids and tons of dates in our apps...there's no way we could do that.

The picker widgets have the setting.  Please.......provide us with a simple setting in the grid to turn them off.

This is so embarrassing.

Thanks.
Atanas Korchev
Telerik team
 answered on 19 Mar 2013
1 answer
137 views
Hello,
I am attempting to upgrade from Kendo v2012.2.71 to the latest internal build: v2012.3.1512 (I also tried the latest official release build).

In my existing code, I was previously defining a datasource and grid like the following:

var testDataSource = new kendo.data.DataSource(
    {
        transport: {
            read: {
                url: "/api/Grids/Events",
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                type: "POST",
                data: function () {
                    return {
                        filterId: filterId
                    };
                }
            },
            parameterMap: function (options) {
                return JSON.stringify(options);
            }
        },
        schema: {
            model: {
                id: "organizationDeviceId",
                fields: {
                    organizationDeviceName: { type: "string" },
                    EventName: { type: "string" },
                    EventDetails: { type: "string" },
                    EventSeverity: { type: "string" },
                    EventDate: { type: "date" }
                } // End of fields
            }, // End of model
            data: "Entries",
            total: "TotalCount"
        },
        sort: {
            field: "EventDate",
            dir: "desc"
        },
        pageSize: 14,
        serverPaging: true,
        serverSorting: true,
        serverFiltering: true
    }
);
var EventsDataGrid = $("#eventsGrid").kendoGridWithTitles({
    selectable: "row",
    dataSource: testDataSource,
    columnMenu: true,
    filterable: true,
    scrollable: true,
    sortable: true,
    resizable: true,
    height: 500,
    toolbar: kendo.template($("#filterToolbarTemplate").html()),
    columns: [ { title: Globalize.localize("Dashboards_Events_DeviceName"), field: "organizationDeviceName", template: "<a href='//OrganizationDevice?organizationDeviceId=#= organizationDeviceId #'>#= organizationDeviceName #</a>" },
                { title: Globalize.localize("Dashboards_Events_EventName"), field: "EventName" },
                { title: Globalize.localize("Dashboards_Events_EventDetails"), field: "EventDetails" },
                { title: Globalize.localize("Dashboards_Events_EventSeverity"), field: "EventSeverity" },
                { title: Globalize.localize("Dashboards_Events_Date"), field: 'EventDate', template: "<div>#= kendo.toString(EventDate, CloudSAAS.GeneralDateTimeFormat) #</div>" }
                ],
    pageable: { input: true, numeric: false },
}).data("kendoGrid");


Notice that a define testDataSource then use it as the value of the grids datasource. This however seems to lo longer work. Instead I get a blank grid.

If I instead change the code to the following it does work:

var EventsDataGrid = $("#eventsGrid").kendoGridWithTitles({
    selectable: "row",
    dataSource:         {
        transport: {
            read: {
                url: "/api/Grids/Events",
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                type: "POST",
                data: function () {
                    return {
                        filterId: filterId
                    };
                }
            },
            parameterMap: function (options) {
                return JSON.stringify(options);
            }
        },
        schema: {
            model: {
                id: "organizationDeviceId",
                fields: {
                    organizationDeviceName: { type: "string" },
                    EventName: { type: "string" },
                    EventDetails: { type: "string" },
                    EventSeverity: { type: "string" },
                    EventDate: { type: "date" }
                } // End of fields
            }, // End of model
            data: "Entries",
            total: "TotalCount"
        },
        sort: {
            field: "EventDate",
            dir: "desc"
        },
        pageSize: 14,
        serverPaging: true,
        serverSorting: true,
        serverFiltering: true
    },
    columnMenu: true,
    filterable: true,
    scrollable: true,
    sortable: true,
    resizable: true,
    height: 500,
    toolbar: kendo.template($("#filterToolbarTemplate").html()),
    columns: [ { title: Globalize.localize("Dashboards_Events_DeviceName"), field: "organizationDeviceName", template: "<a href='//OrganizationDevice?organizationDeviceId=#= organizationDeviceId #'>#= organizationDeviceName #</a>" },
                { title: Globalize.localize("Dashboards_Events_EventName"), field: "EventName" },
                { title: Globalize.localize("Dashboards_Events_EventDetails"), field: "EventDetails" },
                { title: Globalize.localize("Dashboards_Events_EventSeverity"), field: "EventSeverity" },
                { title: Globalize.localize("Dashboards_Events_Date"), field: 'EventDate', template: "<div>#= kendo.toString(EventDate, CloudSAAS.GeneralDateTimeFormat) #</div>" }
                ],
    pageable: { input: true, numeric: false },
}).data("kendoGrid");
The only difference being that the datasource is now created directly inline with the grid.

Why has this behavior changed? Can I no longer define a remote datasource separate from my grid? Note that if the datasource is not remote (locally defined array) then it does seem to work properly.

Rosen
Telerik team
 answered on 19 Mar 2013
1 answer
63 views
Scroll view is working fine in landscape when we change the orientation to portrait design scroll page is not align properly. Please find the attachment for reference.

Alexander Valchev
Telerik team
 answered on 19 Mar 2013
5 answers
604 views
Hello,

I have an Editor where I have setup with the "paste" event.  I am having no problem with the event firing it is that I can't get it to replace the content correctly.  Here is a working example of the problem http://jsfiddle.net/WgvNr/3/.  To test paste in some Microsoft Word content with some formatting.  The paste event will strip the Word formatting.  This works also, but it leaves the original content and the edited content. How can I just have the edited content show in the editor?
$("#txtActions").kendoEditor({
    tools: [
     "bold",
     "italic",
     "underline",
     "insertUnorderedList",
     "insertOrderedList",
 ],
    paste: function (e) {
        var editor = $("#txtActions").data("kendoEditor");
        editor.value(CleanWordHTML(e.html));
        //console.log(editor);
    }
});
 
Alex
Top achievements
Rank 1
 answered on 19 Mar 2013
6 answers
283 views
My control only allows one file to be uploaded, and I want the k-upload-files section only show the latest file , not the list of files. Is there a configuration that I can change to achieve this?

In my attached image, I only want the second file displayed when the user choose to upload a different image.
Jianwei
Top achievements
Rank 1
 answered on 19 Mar 2013
1 answer
215 views
I'm wanting to have a flow to my conference registration where I ask a question in the first dialog:

Are you a a)speaker b)presenter c)sponsor

if they say speaker they go to a special page before going to the normal registration.

etc,etc,etc.

How would I implement something like this in KendoUI.  My backend is asp.net MVC4 webapi, not that it matters.

Thanks
Devon
Top achievements
Rank 1
 answered on 18 Mar 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
Application
Drag and Drop
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
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?