Telerik Forums
Kendo UI for jQuery Forum
1 answer
141 views
We've run into an issue while developing our application that appears to be a serious design flaw in the way Kendo Mobile handles parameterized remote views.

Our app will be relatively large; large enough that putting all the HTML in a single file and using local views for everything is not an option. So we are using remote views, but all remote views are still going to be static HTML files living inside the app (we are using PhoneGap), and we plan to pass parameters to the remote views through the query string. Unfortunately we've run into problems with this. Let me try to explain the issue:

When calling a local view and passing parameters, the first time it is called the view is initialized, then the "show" event is called, passing the parameters. Subsequent calls to the local view will skip the initialization, and only the "show" event is called with the new parameters.

When calling a remote view with parameters, the first time it is called the view is loaded and initialized, then the "show" event is called, passing the parameters. Subsequent calls to the remote view with the same parameters then skip initialization, and the "show" event is called passing the parameters. However, if you pass different parameters, the view is loaded and initialized again, creating a copy of the original remote view, then the "show" even is called on this new instance of the remote view. Calling it again with different parameters will create yet another copy of the view, and so on until you have potentially many, many copies of the same remote view.

This behavior is very inconsistent, and causes a host of issues, including:
  • Multiple copies of the same view unnecessarily consume additional resources
  • Scripts included in the remote view are loaded multiple times, causing hard to debug issues
  • Elements with IDs get duplicated, creating issues when trying to target elements inside a view
  • The same remote view is initialized multiple times, reducing performance
  • It's inconsistent with the way local views work, causing confusion for the developer
The main problem is that there is no way to call an existing instance of a remote view with different parameters. As far as I can tell, with the current design it is impossible.

According to the answer in this thread, this behavior is by design: http://www.kendoui.com/forums/mobile/general-discussions/remote-views-querystrings-odd-behaviour.aspx. It was also suggested that a possible solution is to remove the remote view from the DOM on hide. This causes its own set of issues, and is only a work-around for a design limitation in Kendo Mobile.

Now I realize that in some cases it may be desirable to have a remote view be loaded as a separate instance based on the parameters, but that would be the special case in my opinion, and it would be more common to want the remote views to work in a way consistent with local views.

I hope I have described the issue clearly enough. Here are some possible solutions that I can think of:
  1. Make an option on the Application object that lets developers choose how they want parameterized remote views to function
  2. Allow passing parameters to remote views through the URL fragment (after the '#' character). These parameters would be ignored when determining if a remote view is already loaded or not, but would be passed to the 'show' event
  3. Allow passing parameters to views through some other means. For instance, the navigate() function could take an additional parameter that is passed to the show event (this could also be useful because it would allow us to pass JS objects to other views)
For now in our project, I have been forced to implement a work-around that overrides the showView and _createRemoteVew functions to use the urlPath variable instead of the full url when reading and writing to the data-url attribute of the view element. This simple change brings the behavior of parameterized remote views in line with local views, allowing us to continue development of our application.

Please consider changing the behavior of Kendo UI Mobile for future releases, or at least giving us viable options, so I don't have to resort to nasty hacks and workarounds.

Thanks,
Jonathan

Petyo
Telerik team
 answered on 15 Nov 2012
1 answer
74 views
Hello,

when using the splitter in the IE8 Panes are on mouseover reloaded - not in IE9 - how can we explain this?
Is that a bug ? How we can fix this ? (the behavior in IE9 is better !)

Thank you for answer
Dimo
Telerik team
 answered on 15 Nov 2012
1 answer
131 views
We try to make our mobile site viewable on PC browsers, but in the latest release, but the fall release (2012.3 1114) broke ScrollViews on FireFox. It is easily seen by bringing up the ScrollView demo in FireFox. No ability to scroll.

Thanks/Anker

Kamen Bundev
Telerik team
 answered on 15 Nov 2012
1 answer
130 views
how to accomplish this coding using kendo ui
 function Grid_onSubmitChanges(e) {
        e.values.uid = '@Model.uid';
        var insertedrows = e.inserted;
        var updatedrows = e.updated;
}
Muthu
Top achievements
Rank 1
 answered on 15 Nov 2012
1 answer
276 views
please is there option to add a new kendo drop down list in dynamically created table. I  am trying in normal aspx page. how to achieve, i am binding data with json object with page method from vb page.

beauXjames
Top achievements
Rank 2
 answered on 15 Nov 2012
1 answer
192 views
I'm using a Jquery Tools Tooltip component inside a Kendo Grid.
The tooltip is displayed when the mouse hovers the UserName link (see the screenshot, the tooltip is displayed when the mouse hovers "test1" link) ; but the tooltip is hidden behind the grid's header. I'm playing with the z-index of the tooltip in firebug but nothing changes...
Any idea ?

btw will you release a tooltip component in the next versions of KendoUI?
Samuel
Top achievements
Rank 1
 answered on 15 Nov 2012
1 answer
216 views
http://jsfiddle.net/mysterii0/Te8cY/
Please see the link above to jsfiddle.. I'm not sure if this is a 'correct' way of creating extension of a kendoui widget, but it seems to work for what I wanted to do.
Jorge
Top achievements
Rank 1
 answered on 14 Nov 2012
4 answers
1.9K+ views
Hi,

I have a "sign in" button on a view and when a user clicks on it, I want it to run a javascript method. It seems simple and I have a sample one page app which works. However my actual app is several pages and for some reason the same html doesn't work when I copy it from the sample page to the real app. I'm currently trying 3 ways to call the javascript method, but i think the first one is the right way.

<data-role="button" data-click="signInButton">Sign In</a>
<data-role="button" href="javascript:signInButton();">Sign In 2</a>
<data-role="button" onclick="signInButton()">Sign In 3</a>

And the javascript is currently very simple, just popup and alert so I know the method got called and navigate to another view.

function signInButton(e{
    alert('signInButton');
    app.navigate("#phoneMain");
}

Here is the current app http://jsfiddle.net/jwhitmer/vsPye/

A few other forum posts helps me get this far. It runs on iPhone, iPad, Android phone and Blackberry phone. I'm amazed at what Kendo UI can do with so little coding on my part.

Thank you for any guidance,
Jason
Michael Rogers
Top achievements
Rank 2
 answered on 14 Nov 2012
3 answers
267 views
Here is an example:

  @(Html.Kendo().Grid<MyViewModel>(Model.Records)
            .Name("MyGrid")
            .Columns(columns =>
            {               
                columns.Bound(c => c.Price)
                    .HtmlAttributes(new { @class = "gridColumnPrice" })
                    .Title(UIResources.Price)
                    .HeaderHtmlAttributes(new { @class = "gridColumnPrice" });
           })
            .DataSource(c => c.Server()
            )

This code generates JS as below:

jQuery(function(){jQuery("#MyGrid").kendoGrid({columns:[{title:"Price",attributes:{class:"gridColumnPrice"}, ............... ETC

In IE8 and older versions, you will get:
SCRIPT1028: Expected identifier, string or number lyKqsEz1h0Lo7AitxGa6wik1, line 2 character 208

This is because 'class' word in JS is not allowed as class property. You should add apostrophes around properties.
AspenSquare
Top achievements
Rank 1
 answered on 14 Nov 2012
3 answers
599 views
Hi There, i cannot get the datasource to work. Specifically the issue is passing the GET parameter. The only way i've gotten the read to work is to place the paramter directly in the READ URL:


$(document).ready(function () {
            var dsCategories = new kendo.data.DataSource({
                transport: {
                    read: "/CostDriver/GetCostDriverCategoriesByRegion/" + $("input[name='region']:checked").val() ,
            ...

The issue is, on the click of radio button from where this value is coming from, the read uses the ORIGINAL value from the radiobuttongroup from when the page initially loads. Onclick of this radiobuttongroup calls the datasource read but the new value is NEVER sent.

HOW HOW HOW do you properly use the DATA property in the transport? I have tried everything and it does not work.

$(document).ready(function () {
            var dsCategories = new kendo.data.DataSource({
                transport: {
                    read: "/CostDriver/GetCostDriverCategoriesByRegion/",
                    data: { "regionId": $("input[name='region']:checked").val() }
                }
            });
            $("#selectCategory").width(180).kendoComboBox({
                dataTextField: "CostDriverCategoryName",
                dataValueField: "CostDriverCategoryId",
                dataSource: dsCategories
            });

            $("#selectCommodity").width(180).kendoComboBox({ enabled: false });

            $("input[name='region']").click(function () {
                alert($("input[name='region']:checked").val());
                dsCategories.read();
            });
        });
Daniel Cuba
Top achievements
Rank 1
 answered on 14 Nov 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?