Telerik Forums
Kendo UI for jQuery Forum
2 answers
124 views
I have grid validations that I catch/build in the Error event ... how can I pass my validation from the Error event to a detail row? I expand the detail row automatically when an error occurs.
Jason
Top achievements
Rank 1
 answered on 03 Mar 2014
10 answers
768 views
Hello,

I'm fairly new to Kendo ( still testing it for my mobile app ) and i'm trying to display your list of friends (pulled from FB) in a scroll view with their names and pictures. It can go up to 1K + Friends and when switching from a profile to another, the list of friends has to be re populated. I can't have it work, and I'm a bit worried about performances when listing 1000+ friends on the page.

So Basically, I have a ScrollView that I'm trying to rebuild (or at least remove the old data and add new data) when a user get back to the previous page and come back again to this page. It's like a profile page. When you go there for user id = 1 you have some information and a scrollview with his friend's name and pictures, and when I go to another user (id = 2) then I want to change every information on the page, including the information bound in the scrollview.

From what I understand, one can only change the pictures of the scroll view by initiating the view. It doesn't seem to work when data-show is triggered and I have a feeling that we should re-initiate the page completely... Am I right ? Doing the scroll view methods such as SELECTOR.data("kendoMobileScrollView").setDataSource(friendsToInvite) or scrollview.refresh() doesn't seem to work.
Am I doint something wrong or should I re initialize the view everytime a user go back and forth on the different user profiles ? How can I do this ?

here is my HTML:

<!-- Event Page !!! Inherit the layout just above for footer and header -->
        <div data-role="view" data-layout="overview-layout" data-show="initEvent" id="event">
            <div data-role="content" class="content">
 
                <div id="eventContent"></div>
 
                <div>
                    <div id="friendsToInvite"></div>
                </div>
            </div>
        </div>
 
        <script id="friendsToInvite-template" type="text/x-kendo-template">
            <p>#= name #</p>
            <div style="width: auto; height: 180px; background: url('https://graph.facebook.com/#= fbid #/picture?type=large')  no-repeat center;"></div>
            <p><button>Invite</button><button>Dont show me again</button></p>
        </script>


and My JS:

var y = 3;
 
function initEvent( e )
{  
    //Get the "Key" of the event, which is linked to the id somehow
    var key = e.view.params.key;
 
    //Retrieve the event info from the cache with the key !
    var event = Event.retrieveFromKey( key );
 
    // Append the template of the event upon the event info
    var template = Handlebars.compile( $( '#eventTemplate' ).html() );
    $( '#eventContent' ).prepend( template( event ) );
 
    //The next ones are about getting your friend list for this specific event based on the algo
    // Generate an empty kendo Scroll View
    var friendsToInvite = new kendo.data.DataSource({
            data: []
    });
 
    $( "#friendsToInvite" ).kendoMobileScrollView(
    {
        dataSource: friendsToInvite,
        template: $( "#friendsToInvite-template" ).html(),
        contentHeight: 300,
        enablePager: false
    });
 
    $.when( Event.getFriendsList( event.id ) ).done( function( friendsList )
    {
 
        if ( friendsList.length > 0 )
        {
 
            for ( var i = 0; i < y; i++ )
            {
                friendsToInvite.add( { name: friendsList[i]["name"], fbid: friendsList[i]["fbid"] } );
            };
 
            $( "#friendsToInvite" ).data("kendoMobileScrollView").setDataSource(friendsToInvite);
 
  //           y++;
  //           console.log(y);
  //           if (y > 5) {
  //               console.log("refresh");
                // console.log ( scrollview );
                // $( "#friendsToInvite" ).data("kendoMobileScrollView").setDataSource(friendsToInvite);
                // scrollview.refresh();
  // $( "#friendsToInvite" ).empty();
  //           };
  //           console.log(friendsToInvite);
  //           $( "#friendsToInvite" ).kendoMobileScrollView(
  //           {
  //               dataSource: friendsToInvite,
  //               template: $( "#friendsToInvite-template" ).html(),
  //               contentHeight: 300,
  //               enablePager: false
  //           });
        }
        else
        {
            console.log("Got to be creative on this one ...")
        }
    });
}


All that is commented is something I've tried. whithout success.Also, you'll notive that I've filled the scroll view twice: once for the "initialization" with empty data and another one with the data I want to use. The fact that the when() method delay the construction of the scroll view makes it bug. I don't know why.
Alexander Valchev
Telerik team
 answered on 03 Mar 2014
5 answers
2.5K+ views
Hello, Kendo-Team.
I have a question about complex JSON responses: Say, I get  a response like this and want to use this data for creating a Grid:

01.{
02.    "items" : [
03.    ....
04.    ....
05.    ....
06.    {
07.      "fileName": "Pragmatic Bookshelf - CoffeeScript.Jul.2011.ENG.pdf",
08.      "folderPath": "I:\\eBooks",
09.      "absolutePath": "I:\\eBooks\\Pragmatic Bookshelf - CoffeeScript.Jul.2011.ENG.pdf",
10.      "size": {
11.        "bytes": 3573254,
12.        "MBytes": 3.41
13.      },
14.      "mtime": {
15.        "UTC": "\/Date(1315848420988)\/",
16.        "shortDate": "12.09.2011"
17.      }
18.    },
19.    ....
20.    ....
21.    ....
22.    ],
23.    "totalItems": 540
24.}

so how should I use <code>dataSource.schema</code> and/or <code>kendoGrid.columns</code> properties to get size.bytes and/or mtime.UTC ? How to correctly parse this type of DATETIME info via JS ? Templates ?

I only know, I should use <code>dataSource.schems.items</code> to point out the Array with objects (in my case it's "items")
01.dataSource({
02.    transport: {
03.        ....
04.    },
05.    schema : {
06.        data: "items",
07.        total : function(data) {
08.            // if pagination is enabled - it won't work
09.            // without declaring this function
10.            return data.totalItems;
11.        }
12.    }
13.});


without defining any columns, I get size and mtime columns with [object Object] in it.
Shahid
Top achievements
Rank 1
 answered on 03 Mar 2014
1 answer
157 views
I am passing a value from a param from a click event, which works fine;

 <a data-bind="events: { click: roomselect }"  data-target="detailPane">#: desc# </a>

 but I want to get this value to another method within the view-model. I was trying to use "set " but it does not assign the value.  

(I am trying to get the value to the line  in the method init below: url: "http://myURL/api/room/" +  this.roomSelected + "/children",)


 RoomsViewModel = kendo.data.ObservableObject.extend({
        roomsDS: null,
        roomDS:null,
        roomSelected: null,
        
        roomselect: function(e) {
            var that = this;
            that.set("roomSelected", e.data.id);
        },     

        init: function () {
            var that = this, roomDataSource;
            kendo.data.ObservableObject.fn.init.apply(that, []);                 
            roomDataSource = new kendo.data.DataSource({
            
            transport: {
                read: {
                    url: "http://myURL/api/room/" +  this.roomSelected + "/children",
                    dataType: "json",
                    type: "GET"
                },
.......
Petyo
Telerik team
 answered on 03 Mar 2014
1 answer
97 views
Documentation on PanelBar has a dataSource option in the constructor configuration

http://docs.telerik.com/kendo-ui/api/web/panelbar#configuration-dataSource

However the TypeScript definition does not contain this choice:

interface PanelBarOptions {
        name?: string;
        animation?: PanelBarAnimation;
        expandMode?: string;
        activate?(e: PanelBarActivateEvent): void;
        collapse?(e: PanelBarCollapseEvent): void;
        contentLoad?(e: PanelBarContentLoadEvent): void;
        error?(e: PanelBarErrorEvent): void;
        expand?(e: PanelBarExpandEvent): void;
        select?(e: PanelBarSelectEvent): void;
    }
Atanas Korchev
Telerik team
 answered on 03 Mar 2014
2 answers
122 views
How does one know if the kendo files one is using in AppBuilder are up to date?  And if one finds out they are out of date, how would one update them?  The reason I ask, most posts in the forums and all references on kendoui.com speak of release by quarter, eg. Q3 2013.  But the versions in the files themselves are in this format: v2013.1.621.  Is the "1" the quarter?

Thank you,

kelly

Iva Koevska
Telerik team
 answered on 03 Mar 2014
2 answers
142 views
I have observed that drawer animation becomes "jumpy" if view performs a lot of data loading and binding on show. As a way around it, I am building postponing any heavy duty processing until the animation is completed.

I am using deferred promises to watch for the transition to complete using the following. Here's a question: is there a way to do it?

$.Deferred(function(){
    var promise = this;
    timer = setInterval(function() {
        if ($("#my-drawer:not(:visible)")[0]) {
            clearInterval(timer);
            promise.resolve();
        
    }, 100);
})
Kiril Nikolov
Telerik team
 answered on 03 Mar 2014
3 answers
122 views
After I build a theme for DataViz in the themebuilder what do I do with the JSON that I am able to generate?  When I click on the button in theme builder that says "What do I do with this?" it just tells me about how to replace the css for the web themes... 

So if I want to globally change my dataviz themes how do I do this using the theme builder?

Thanks,
Jason
Iliana Dyankova
Telerik team
 answered on 03 Mar 2014
1 answer
146 views
Hi,

I need your help with some special requirement.
I'm building a theme for a popular ecommerce engine using TPL files and vqmod. I have not access to modify the query, need to by clean.

And i need to fill the list view some like this:

<?php if ($customers) { ?>
<?php foreach ($customers as $customer) { ?>
<li>
   <h3 class="time"><?php echo $customer['date_added']; ?></h3>
   <h3><?php echo $customer['name']; ?></h3>
   <a data-role="button" data-rel="external" style="float: right;" href="mailto:<?php echo $customer['email']; ?>" data-icon="compose">Email</a>
   <p><small><?php echo $column_email; ?>: <?php echo $customer['email']; ?></small></p>
   <p><span><b><?php echo $customer['status']; ?></b></span></p>
</li>
<?php } ?>
<?php } else { ?>
<li>
   <h2><?php echo $text_no_results; ?></h2>
</li>
<?php } ?>


So, my problem is: Can i group items in a listview without a datasource?

My example is here, please advise...

http://jsbin.com/toxuyate/4/edit

Kiril Nikolov
Telerik team
 answered on 03 Mar 2014
20 answers
237 views
I updated to the newest kendo release yesterday and I've noticed that the loading graphics (i.e. app.application.showLoading();) have changed on android, but not on iOS. I like the graphics on iOS, where the motion icon is centered over the app. Android displays a dark translucent sheet over the entire app. It looks bad. How can I get rid of it?
Kiril Nikolov
Telerik team
 answered on 03 Mar 2014
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)
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
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
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?