Telerik Forums
Kendo UI for jQuery Forum
1 answer
204 views
This is the html code of one of my views in an Android app. What I have in this view is a listview (li-items are added dynamically) and when an item in the listview is clicked, the 'contenPageContainer' is made 'visisble'

<div data-role="view" id="tabstrip-home" data-title="MaxApp">
    <ul id="linksList" data-role="listview" data-style="inset">
    </ul>

   
<div id="contentPageContainer" class="contentPageContainer" style="visibility:hidden">
        <div data-role="scroller" class="contentPageContainer" id="scrollContentPageContainer">
            <div id="eventTitle" class="contentPageHeader"></div>
            <div id="entryText"></div>
            <p><a id="btnOk" data-role="button" style="background-color: rgb(0, 111, 81);float:right;">Ok</a></p>
            <p> </p>
        </div>
    </div>
</div>
In the click event I call a function that sets the content of div 'eventTitle' and div 'entryText' and it sets visibility of div 'contentPageContainer' to 'visible'.
function showRssItem(selectedEntry) {
    document.getElementById("eventTitle").innerHTML = '<strong><p>' + entries[selectedEntry].title + '</p></strong>';
    var contentHTML = "";
    contentHTML += entries[selectedEntry].description;
    contentHTML = '<p><img src="images/menu_logo_maxgrip.png" /> ' + contentHTML + '</p>';
    contentHTML += '<p><a href="' + entries[selectedEntry].link + '">Read Entry on Site</a></p>';
    document.getElementById("entryText").innerHTML = '';
    document.getElementById("entryText").innerHTML = contentHTML;
    document.getElementById('contentPageContainer').style.visibility = 'visible';
}
This seems to work ok als long as the scrolling functionality of scroller is not needed. Ie. if div 'entryText' contains only a few lines of text there is no problem. The 'Ok' button is in view and when the user clicks it, the javascript code to close it is executed properly causing the div 'contenPageContainer' to hide again.

If it contains too much text to show in the div 'contentPageContainer' then the user has to scroll down to get the 'Ok' button in view. Closing still works fine, but when you click a differen listview item afterwards, then the container is shown, but eventTitle and entryText are not visible.

I have tried to solve that with this code, but to no avail.
var scroller = $("#scrollContentPageContainer").kendoMobileScroller();
scroller.reset();
scroller.movable.moveTo({x:0,y:0});
Clicking the listview item with many lines again, shows the bottom of the content and the 'Ok' button, but I can't scroll to the top of the text. Actually I can, but when I lift my finger from the screen, the scroller jumps back to the bottom.

Any suggestions what could be wrong?

To make it complete, here is the css code of the div 'contentPageContainer'
div.contentPageContainer
{
  display: block;
  background-color: #5EA491;
  color: #FFFFFF;
  position: absolute;
  top: 10px;
  left: 2%;
  width: 96%;
  height: 95%;
  -moz-border-radius: 5px;
  border-radius: 5px;
}







Jan-Dirk
Top achievements
Rank 1
 answered on 15 Nov 2012
5 answers
2.6K+ views
Hello,

I'm wondering if what I'm doing to remove the grid's filter is correct or if there's a right approach.

Here's the code

var filter = { };
grid.dataSource.filter(filter);

Just
Top achievements
Rank 1
 answered on 15 Nov 2012
0 answers
161 views
Why can you not release the samples you have in your various screenshots as demos? The Music Store demo
was nice but I still prefer that interesting looking Customer View you have in your screenshots for Web Demos.

Also. The nice looking Mobile screenshot with various DataViz integrations looks exactly what we would need as inspiration.

The Webcast yesterday promised some new interesting Mobile Demos but I have yet to see any.

Marcus
Top achievements
Rank 1
 asked on 15 Nov 2012
1 answer
329 views
I found similar posts but nothing that really addresses the concern.  Basically want to implement Cancel on a ViewModel.  I've created a fiddle http://jsfiddle.net/yN5Cd/1/
Pretty simple, just create a model and a schema.  Create  a datasource setting the schema.  Add the model to the datasource and call sync().  Bind the first and only item in the datasource to a template.

What I really want to is to able to cancel changes on the item in the datasource.  I do have a Cancel button and it calles cancelChanges on the datasource but results in a an empty dataSource. 

I don't see why it's so much different than editing a datasource bound to a listview.  The cancel works great when the datasource is populated using the transport url.  But when I add an item in the javascript, the datasource removes it as soon as cancelChanges is called.
I would expect the original state of the model to be restored and the model to remain in the datasource.

Thanks,
Petur Subev
Telerik team
 answered on 15 Nov 2012
1 answer
219 views
Hi All i am trying to change the width of the actual drop-down from the dropdownlist while keeping the dropdownlist element itself a smaller size.

In the combobox you can

.data("kendoComboBox").list.width(380); and that sets the width of drop down itself.

this does not work for the kendoDropDownList . I've tried:

data("kendoDropDownList").list.width(380); and the items themselves no longer wrap BUT the actually background container stays the fixed width.

I don't want to go and modify the css because different instances of the drop down require different widths. 
Georgi Krustev
Telerik team
 answered on 15 Nov 2012
1 answer
152 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
81 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
138 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
136 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
286 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
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
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?