Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.1K+ views
Hi,
I need to get dinamically the screen size of all mobile device from a webpage using javascript. I have tried this:

//get windows size
if (document.body && document.body.offsetWidth) {
 windowsWidth
= document.body.offsetWidth;
 windowsHeight
= document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
    document
.documentElement &&
    document
.documentElement.offsetWidth ) {
 windowsWidth
= document.documentElement.offsetWidth;
 windowsHeight
= document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
 windowsWidth
= window.innerWidth;
 windowsHeight
= window.innerHeight;
}

but on iPad I get these size: 980 x 1080 (not the real 768 x 1024).

Thanks Mauro

John
Top achievements
Rank 1
 answered on 21 Aug 2012
0 answers
100 views
I am looking at using the KendoUI framework.   How would one determine which way to go once a user navigates to your website?. Example would be have a seamless transition to the best  interface for the end device.... to instigate a grid control for your "PC" users or a list view / mobile application for your mobile device users.

On the server side would it be correct  to just look at the user agent and return the appropriate javascript/html/css that is targeted for the end environment?  Or is there an API in KendoUI that you could call that would make that decision for you instead of manually checking the agent?


Warren
Top achievements
Rank 1
 asked on 21 Aug 2012
1 answer
146 views
I coded to call a ListView and I want to have it where I can either set the selectable attribute off or on depending on how I am using the view at the time.  I find that once I call the KendoListView with selectable: true, it never turns off, even if I reload with the isSelectable set to false).  Is there something I need to do to clear the previous setting?  

Here is a sample of the code:

        $("#content").empty();
        $("#content").append(template);


        if (isSelectable) {
            $("#content").kendoListView({
                dataSource: dataSource,
                template: kendo.template($("#template").html()),
                selectable: true,
                change: function (e) {
                    alert("selected change event");
                }
            });
        }
        else {
            $("#content").kendoListView({
                dataSource: dataSource,
                template: kendo.template($("#template").html()),
                selectable: false
            });
        }

Paulie
Top achievements
Rank 1
 answered on 21 Aug 2012
2 answers
369 views
Hi,
In a scenario like this example here: http://jsfiddle.net/H4kNW/light/ 

How should the schema model be on my datasource when I want to use nested fields like this in my view model:

<input id="first" data-bind="value: Person.FirstName"/>
<input data-bind="value: Person.MiddleName"/>
<input data-bind="value: Person.LastName"/>

I tried:
var schemaModel = kendo.data.Model.define({
    id: "Id",
    fields: {
        Id: { editable: false, type: "number" },
        Person: {
            FirstName: { editable: false, type: "string" },
            MiddleName: { editable: true, type: "string" },
            LastName: { editable: true, type: "string" }
        }
    }
});


But this did not work.  Please advise of the correct way someone?

Much appreciated!
Petr
Top achievements
Rank 1
 answered on 21 Aug 2012
7 answers
486 views
I'm evaluating Kendo UI for a new MVC application and I'm having trouble getting started. I followed all the set-up directions listed the in documentation here:

http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/introduction

but after putting the following on my home page

             

     @Html.Kendo().AutoComplete()

        .Name("from")

        .DataTextField("Name")

        .DataSource(source =>

                    source.Read(read =>

                                read.Action("Get", "Addresses")

        ).ServerFiltering(true))    

I get:

System.NullReferenceException occurred
  Message=Object reference not set to an instance of an object.
  Source=Kendo.Mvc
  StackTrace:
       at Kendo.Mvc.UI.WidgetExtensions.GetUnobtrusiveValidationAttributes(IWidget instance)
       at Kendo.Mvc.UI.Html.DropDownListHtmlBuilderBase.Build()
       at Kendo.Mvc.UI.AutoComplete.WriteHtml(HtmlTextWriter writer)
       at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
       at Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToHtmlString()
       at System.Web.HttpUtility.HtmlEncode(Object value)
       at System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, Object content)
       at System.Web.WebPages.WebPageBase.Write(Object value)


Jeff
Top achievements
Rank 1
 answered on 21 Aug 2012
0 answers
119 views
Hi All,

Can you please help me on this.

telerik hierarchical  grid row cell onmouseover tooltip values show in asp.net mvc3 telerik grid.
if i have first row have value1 this is the parent of 2 childs now i need to show tooltip ,if i mouseover the value1 tooltip will shows the child two values same like  3 levels.

Please help me anybody on this 

Advanced thank you.


Regards,
Narasimha

pnara
Top achievements
Rank 1
 asked on 21 Aug 2012
2 answers
1.4K+ views
Hi all

I am digging deeper and deeper into the world of Kendo, encountering new challenges behind each corner ... :-)

I am now trying to implement two cascading dropdown lists similar to the demo.

However I cannot replicate the behavior of the demo, and I am looking to encounter this challenge.

The demo contains three dropdownlists, of which initially two are disabled.
When I select an option in the first, the second will be enabled and I can see some options connected to the selected option.
The datasources are independent webservices which are queried on the moment of rendering the page or later (this is not clear to me).
I assume the second dropdownlist is populated on rendering, and filtered upon enabling it.

I have tried to implement two cascading dropdowns, of which both are enabled from the start.
Both are populated from the startm and there is no filtering at all.

This is my code:
<% 
    Using Html.BeginForm()%>
 
    <div id="legent">
    </div>
     <div id="numbers" disabled="disabled" >
    </div>
    <input type="submit" value="choose" name="r1"/>
 
 
<%end using %>
    <script>
        $(document).ready(function () {
            $("#legent").kendoDropDownList({
                optionLabel: "Legent...",
                dataTextField: "Name",
                dataValueField: "Id",
                dataSource: {
                    transport:
                    {
                        read:
                        {
                            type: "GET",
                            contentType: "application/json; charset=utf-8",
                            url: "http://jason.platform4telecom.com/JsonProfiling/enableme/test%5Eoneoverview%5Ecom/abc/xyz",
                            jsonpCallbackString: "mycallback",
                            dataType: "jsonp"
                        }
                    },
                }
            });
 
            var numbers = $("#numbers").kendoDropDownList({
                autoBind: false,
                cascadeFrom: "legent",
                optionLabel: "Select product...",
                dataTextField: "Identifier",
                dataValueField: "Custnr",
                dataSource: {
                    transport: {
                            read:
                            {
                                type: "GET",
                                contentType: "application/json; charset=utf-8",
                                url: "http://jason.platform4telecom.com/JsonProfiling/FindNumbers/test%5Eoneoverview%5Ecom/abc/xyz",
                                jsonpCallbackString: "mycallback",
                                dataType: "jsonp"
                            }
                    }
                }
            }).data("kendoDropDownList");
 
        });
    </script>

I follow exactly the sample on the site; nevertheless it is not working.

I have following questions:
- where is the filtering taking place?
- how is the value selected in the first dropdownlist passed to the second dropdownlist?
- why is the second dropdownlist not disabled (as in the sample)?

The scripts I am using, are:
    <script src="/Content/kendo_scripts/console.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
    <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.mobile.all.min.css" rel="stylesheet" />

Looking forward to your help!

Henk Jelt
Henk Jelt
Top achievements
Rank 1
 answered on 21 Aug 2012
0 answers
124 views
Hi,

Just wanted to let you all know that it is possible to use the Kendo framework in C# using SharpKit - a C# to JavaScript cross compiler.

Reference documentation and SDK:
http://sharpkit.net/help/SharpKit.KendoUI/SharpKit.KendoUI/ 
http://sharpkit.net/help/SharpKit.KendoUI.Web/SharpKit.KendoUI.Web/ 

Cheers!


Dan el
Top achievements
Rank 1
 asked on 21 Aug 2012
2 answers
160 views
Kendo mobile Icons(Tab strip icons and nav bar icons) are not loaded correctly in the internal build Q2.815 when "launched from add to home screen button". However, it works all right from the browser itself. I am on iPhone4 ios 5.1.1.
Has anyone noticed this issue? Has anyone solution for this?

What I mean by 'not properly' is that it shows wrong tab strip icons (yes it does load but wrong items) and this is same for the nav back button, it doesn't load the back arrow ended buttons but some funny looking buttons. Functionally, it works ok though.

I guess this is a mix up on the image pallette but stragely this only happens when luanched from the "add to home screen button".

Thanks heaps for reading!

Joon Choi
Joon
Top achievements
Rank 1
 answered on 21 Aug 2012
1 answer
113 views
Hi there,

We experience this in Android Jelly Bean, default browser for 'onlick' event. We just used the modal window sample. The test page is attached.

How to reproduce: Click to open the modal window and let's say there is a button in the modal window at the same position as the button used to open the modal window. Then it automatically triggers the modal window button's 'onclick' too.

But this works fine with 'data-click'. But needs to verify that, can't we use onclick/mouseup...? Is there a workaround?

/Maddy  
Petyo
Telerik team
 answered on 21 Aug 2012
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
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?