Telerik Forums
Kendo UI for jQuery Forum
4 answers
116 views
Hi,

I have got a view with a lot of content (about 18000px high on my smartphone) and I am trying to jump to a specific position in the view by calling

$('#myview').data('kendoMobileView').scroller.scrollTo(0,-200);

upon clicking a particular button. If I click the button before I do anything else, this does not work properly: the scroller scrolls down a bit but returns to the top immediately. However, if I scroll the scroller manually before I click the button, it works perfect.

By the way, I also found that the scrollTop property of the scroller widget returns undefined or NaN in the beginning.

Best,
Alex

P.S.: I am using Kendo UI Mobile 2013.1.527 but the error also occurs with the stable build 2013.1.514.
Missing User
 answered on 23 Jun 2013
3 answers
1.0K+ views
I have a functioning TreeView using and Ajax datasource that displays six root nodes, some of which have children.  I want to automatically find a child node by its id and then select the child and expand it's parent node(s) in order to be visible.  The problem I have is that the TreeView only loads the root nodes.  Querying both the tree and datasource result in the child not being found, but I can find and select one of the six root nodes.  I have tried setting LoadOnDemand(false), but it doesn't load all the child nodes.

I have not been able to wrap my brain about how to generate a full hierarchical dataset in my MVC controller to return as JSON that would have all the child nodes based on the examples I have seen.  Am I missing a method/configuration setting to load all children in the tree automatically?    I've been Googling and looking at lots of stuff, but maybe I'm just being dense.  

Any pointers are appreciated!

Edit 23 June 2013

I finally found out the root of the problem.  I found it in this post:

http://www.kendoui.com/forums/mvc/treeview/treeview-ajax-without-load-on-demand.aspx

The LoadOnDemand(false) does not work when using the MVC Wrapper and a HierarchicalDataSource.  Once I converted to pure JavaScript initialization, everything started to work once I converted my data to a hierarchical structure.  For those of you looking for a good library to convert flat tables into a hierarchical structure, take a look at this set of classes.  They worked great for me.  The only drawback is that it does not work with null parentIds.

http://blog.reneorban.com/2012/04/ashierarchy-generic-extension-method-to_12.html

I also made use of this Linq example to convert the model:

http://stackoverflow.com/questions/947831/c-sharp-algorithm-for-generating-hierarchy

Finally to find, select, and expand the necessary nodes in the tree, I leveraged this example:

http://www.kendoui.com/forums/ui/treeview/example-treeview-with-highlight-search-term.aspx

Hopefully others will find these references useful. 
Fred
Top achievements
Rank 1
 answered on 23 Jun 2013
2 answers
149 views
I've spent a lot of time trying to get items that are added to a ListView or "source" bound element (i.e. <div data-bind="source: myData"></div>) to fade in using FX Fade (http://docs.kendoui.com/api/framework/fx/fade) instead of just appearing abruptly.  Unfortunately, I have been unsuccessful.  Can you explain how to do it in *both* cases (i.e. when using a ListView and when using source binding)?

Here is as far as I got when trying it with a ListView:
var myData = [];
 
$('#MyListView').kendoListView({
  dataSource: myData,
  template: myTemplate,
  dataBinding: function (e) {
    for (var i = 0; i < e.items.length; i++) {
      kendo.fx($('div[data-uid="' + e.items[i].uid + '"]')).fade('in').play();  // THIS DOES NOT WORK.
    }
  }
});
 
myData.push('Test data item');  // SHOWS UP IN THE DIV, BUT DOES NOT FADE IN.

Your help would be greatly appreciated.  Thanks.
Don
Top achievements
Rank 1
 answered on 23 Jun 2013
6 answers
302 views
Morning All,

Are there any plans to release a light box or image gallery control?  

I have seen your AeroViewer Demo , which is close to my clients requirement but as yet no source to see which controls you have used to create it.

Are controls for multimedia on your RoadMap?

Cheers

Steven
Gabriel
Top achievements
Rank 1
 answered on 23 Jun 2013
15 answers
4.0K+ views
How can I turn on (or create) a subtle hover highlight for rows when my grid is row-selectable?  

This should be a built-in feature since such an effect should look good within the chosen theme.  

If it's not, can you suggest some CSS and what class to apply it to that would use theme-friendly hover highlighting?
Andrew
Top achievements
Rank 1
 answered on 22 Jun 2013
2 answers
66 views
Hi,

I'm trying to display a single data object which is loaded through a remote datasource.

My ideal component would be either

a) A listview which stretches to the entire screen and doesnt scroll
or
b) A view which has the data source loading functionality of a list view and passes that into a view

Do you have any recommendations on how to proceed? Are there other alternatives which I haven't considered?

Thank you!
Matt
Matt
Top achievements
Rank 1
 answered on 21 Jun 2013
2 answers
88 views
Hello,

I have a custom mobile site that is using a hand-built mobile framework, but at the end of last year, we imported a kendo ScrollView into the site in order to have and improved image carousel.

This worked flawlessly, we simply called:
$(SELECTOR_HERE).kendoMobileScrollView();

This week, we attempted to update the site to the Q1 release (v2013.1.319 ) of the Kendo Framework, and found that this line has started throwing an error and no longer creates a carousel.

 After importing the non-compressed version of kendo mobile, I was able to track down the following:
MobileWidget = Widget.extend({
        ...
        ...
        container: function() {
            var element = this.element.closest(kendo.roleSelector("view layout modalview"));
            return kendo.widgetInstance(element, kendo.mobile.ui) || ContainerNullObject;
        }

After running the debugger, I can see that element is undefined, so I am assuming that kendo is now assuming that I am forcing the whole site to be a mobile app... which would be a ton of work to implement on this legacy site.

Has kendo officially stopped supporting individual initialization of the mobile components unless you are running the whole page as an app? (this would be very disappointing and greatly reduce the usefulness of the product for my company)

If not, can anyone tell me if the syntax changed or something in Q1?

Thanks!

Jim
Top achievements
Rank 2
 answered on 21 Jun 2013
3 answers
182 views
Hi:

I have a Company entity with a collection of child Employee entities.  The controller is defined like this:

public JsonResult JsonIndex()
{
    //var allCompanies = _db.Companies;
 
    var allCompanies = from c in _db.Companies
                       select new
                    {
                        CompanyName = c.CompanyName,
                        hasChildren = c.Employees.Any(),
                        ImageUrl = "/Images/icons/Employee3_16.png",
                        children = from e in c.Employees
                        select new
                        {
                            CompanyName = e.FirstName,
                            hasChildren = false,
                            ImageUrl = "/Images/icons/Company20_16.png",
                        }
                    };
 
    JsonResult json = Json( allCompanies,JsonRequestBehavior.AllowGet );
    return (json);
}
The company entities appear in the first level of the treeview correctly.  Where there are employees, the graphic on the left appears, but when I try to click on it to show them, it disappears.  As you can see, I am renaming the columns in the employee records to match the same names so they should bind correctly, shouldn't they?  I've looked at the remote data example, but the demos won't work on my machine (I've got another post asking about that), so I can't see what the json string should look like.

My Razor MVC cshtml looks like this:
@(Html.Kendo().TreeView()
      .Name("treeview2")
      .DataTextField("CompanyName")
      .DataImageUrlField("ImageUrl")
      .LoadOnDemand(true)
      .HighlightPath(true)
      .Events( events =>
        events.Change( "onTreeViewChange")
      )
      .DataSource(dataSource => dataSource
                                    .Read(read => read
                                                      .Action("JsonIndex", "Home")
                                    )
      )
      )
The employee entities exist correctly when I view them from the controller code.  Can you tell me what I am missing?

Thanks,

Terry











Petur Subev
Telerik team
 answered on 21 Jun 2013
6 answers
806 views
hi expert,

I am new to Kendo component. In our project, we do not use the MVVM model because we adapt an existing application. We do a kind of face-lift with Kendo control. We have no problem to provide data to Combobox, calendar and some smaller control. But with the grid we hit a wall! ;-)


All object are quite complex with setter and getter and got several link to other object. I am not the "object part" programmer and I can't talk much on that. The point is that when I do:

$elem.kendoGrid({
    dataSource: {
        data: obj[acteurParam['prop']]  //return my collection
    },
});


The JS start a big big non stop loop. If I break the process and check in the stack windows of me firebug, I can see that KendoGrid try to do many many "Wrap" again the object. I think Kendo read the custom object and try to wrap it to Observable or something like that. Than Kenfo follow link to other objet and loop indefenitly.


Do I have a way to block that? Can I define manually with object to link. Example: Obj1.Title to column 1 and obj1.Name to column 2 ?


Any suggestion?
Pierre
Top achievements
Rank 2
Iron
Iron
 answered on 21 Jun 2013
4 answers
220 views
I have an HTML5 <progress> element where I want both the value and the max driven by the VM.

I have tried this on a couple browsers, and it seems that attribute values for MAX and VALUE are fetched at init, but are not later updated. Is this something that can be driven dynamically? My fallback will have to be JQuery.

<div class="Part">
    <progress id="ProgressBar"
        data-bind="attr: { max: TotalSize, value: TileCount }"></progress>100%
</div>
Daniel
Telerik team
 answered on 21 Jun 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
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
SPA
Filter
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?