Telerik Forums
Kendo UI for jQuery Forum
3 answers
255 views
Hi,
 
I'm trying to make a Pinterest like page for images -  the images will need to be clickable to display some kind of pop-up or light box so the user can vote for or share the image. I need endless scrolling with a responsive widget that wraps the images as the screen size changes. So, in a desktop environment there might be 10 images across while in a mobile environment there might be one, two, three , or four depending if the mobile device is a phone or tablet.

The only widget I see with endless scrolling is the Mobile List View, though the Scroll View custom template example does seem to do that too. I just can't figure out how to make it work with our XML datasource. (I might actually prefer using this widget but, like I said, I can not figure out how it works. I welcome any advice here too.)

Using the Endless Scrolling mobile List View example as a start, how do I get it to display images horizontally to fill a row to the width of its container and wrap to 
the next row when needed? (It seems that when I don't use the endless scrolling setting that the images will form 3 columns but with endless scroll turned on the widget insists on only having one column).

I have tried following the following post but it is getting me no where as the images are always stacked on top of each other as though I made no changes:
http://www.kendoui.com/forums/kendo-ui-mobile/general-discussions/container-for-images.aspx

Also, how do I dynamically set the total count of images in the datasource. The total count is unknown until the data is brought back. The total count is an attribute of the root element in the returned XML.

Thanks,
Eric
Petyo
Telerik team
 answered on 18 Nov 2013
1 answer
219 views
To better explain what I'm looking to do I adapted a sample from the cascading dropdownlists. View JSFiddle example  The issue is with the data format...

Work flow is that we have selected a town. Then all the streets in that town are populated in DDL. Once street is selected, then all the street numbers on that selected street are populated in the last DDL.

Note: The mock data is a sample of the real data with much less. Code from the existing REST endpoint creation can be viewed in here: REST C# endpoint

What tweaks do I need to make to take advantage of this perfect example for a cascading dropdownlist?

Thanks in advance!
Alexander Valchev
Telerik team
 answered on 18 Nov 2013
3 answers
91 views
Hi,

Kendo Web 2013.2.918 no longer has the DropDownList.enable(enabled) function.  It appears that this has been removed from your documentation as well.  But, interestingly, it is still in the demos on your website.  Did you remove this?  Why?  Now I have to use readonly and then set the disabled styling manually which is doable but what a hassle for people upgrading.

Georgi Krustev
Telerik team
 answered on 18 Nov 2013
1 answer
223 views
Hi Kendo team,

I have a problem with reading the datasource. 

 data = new kendo.data.HierarchicalDataSource({
//----i am using this one---
                //transport: {
                //    read: function (options) {
                //        $.ajax({
                //            url: '/Inventory/GetcategoryTree',
                //            type: "GET",
                //            dataType: "json"
                //        });
                //    }
                //},
//-----or this one------
                transport: {
                    read: {
                        url: function () {
                            return '/Inventory/GetcategoryTree';
                        },
                        create: {
                            dataType: "json",
                            type: "GET",
                            cache: true
                        }

                    }
                },
                schema: {
                    model: {
                        id: "Id",
                        children: "Children"
                    }
                },
                scrollable: true,
                sort: { field: "CategoryName", dir: "desc" }
            });

Then i add the DS to the tree:


    var treeView = $("#treeview").kendoTreeView({
        dataSource: data,
        scrollable: true,
        dataTextField: "CategoryName",
        select: function (e) {
            this.expand(e.node);
        }
    }).data("kendoTreeView");

So now the problem is, when i call the treeView.dataSource.read() nothing happens and in debugger i see that the read() is undefined.(cant see it in the list of methods too)

Do you guys now when this ca occur, and under what circumstances. Is it the HierarchicalDataSource? I can see that the data source is there and i see the data too. However on break point in Chrome the dataSource is "B.extend.init"  
Atanas Korchev
Telerik team
 answered on 18 Nov 2013
1 answer
525 views
I want to collapse the node on single click. To do that i need to know if the node is expanded so i can call collapse(e.node)

Thanks a lot team
Dimiter Madjarov
Telerik team
 answered on 18 Nov 2013
1 answer
859 views
Hi !

i've got a problem to make my filter works,.
i'm doing a request to a file that contains some json code see below:

[
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058500","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058501","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058502","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058503","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058504","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058505","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058506","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058507","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058508","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058509","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"}
]
and here is my request :

function getDataFromFileById(fl){
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: "./data.json",
                dataType: "json",      
            },
        },
        filter: { field: "ID", operator: "eq", value: fl }
    });
    console.log(dataSource);
    return (dataSource);
}
when i'm using this function without any filter, it works perfectly.
i read the doc and i did try to add some filter by the same way and i get an object but without my data ...
by the way the 'fl' parameter i use as filter is a number (058500).
am i doing something bad ? 
thanks for reading and answering,
best regards :)
Atanas Korchev
Telerik team
 answered on 18 Nov 2013
1 answer
191 views
Hello,

I want to render schedule in a day view but time line should be rendered horizontal. All of the demo examples include timeline in vertical orientation which seems default. Any help is appreciated?

thanks

pravin
Rosen
Telerik team
 answered on 18 Nov 2013
1 answer
169 views
I have an autocomplete textbox working with an odata endpoint. In addition to the $filter that kendo generates I'd like to add an additional filter to eliminate "deactivated" items.

The approach shown in the code below works for grids, but (understandably) kendo uses its own $filter and ignores mine (in particular below, see $filter: "Hidden -eq false" bit):

$("#product-entry-list input").kendoAutoComplete({
    filter: 'contains',
    dataTextField: 'Name',
    dataSource: {
        type: 'odata',
        serverFiltering: true,
        serverPaging: true,
        pageSize: 20,
        transport: {
            read: {
                url: window.rootUrl + 'odata/ProductLines',
                dataType: 'json',
                data: {
                    $filter: "Hidden eq false"
                }
            }
        },
        schema: {
            data: (d) => d.value,
            total: (d) => d['odata-count']
        }
    }
});

Is there a spot in the autocomplete or datasource API where I can inject custom filtering? Alternatively I suppose I could create a special ODataController for ProductLines that only shows active items, but it seems "nicer" to just have a single ProductLines OData endpoint and let the clients describe what they want.



Jason
Top achievements
Rank 1
 answered on 16 Nov 2013
4 answers
167 views
Hi!

I'm struggling a bit with recurring events again. This time, I'm trying to set up a monthly event to occur e.g. every first Wednesday. The event is rendered for some months, but not all. Also, the rendering does not seem to be consistent between views; e.g., the event might show up in Day View but not in Week View and so on.

The problems I reported earlier re. recurring events (which you fixed!) seemed to be related to a localized (Norwegian) setting, but this one also occurs in the online demos, e.g. the one at http://demos.kendoui.com/web/scheduler/index.html

Best regards,
  Gunnar


James Hood
Top achievements
Rank 1
 answered on 15 Nov 2013
2 answers
261 views
Attached is the latest UI i'm developing to manage our attachments.

UI Description:
The UI is not wrapped in a form element.
'Select file' is a custom command on the toolbar on the Grid with a custom template being the kendo upload control. (autoUpload=false)
The Grid is grouped by 'Component Type'.
Reset and Save Changes are working buttons that work with our model to ensure validation.


Once we attach a file the generated kendo button $(".k-upload-selected") when manually clicked Calls our onUpload method.
When we try to wrap it behind Save Changes button like in our UI - onUpload is not called when invoked with
$(".k-upload-selected").click();  

So how can i make it work when invoked through javascript?
$(".k-upload-selected").click();   what am i missing?






leblanc
Top achievements
Rank 1
 answered on 15 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?