Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Pass additional parameters to Data method of Mobile Listview

$
0
0

Hello,

The CRUD operations are part of the Kendo data source configuration, not the widget itself. The Mobile Listview, ListView and other widgets use the Kendo data source, so the Data method should exist in this case as well. 

I tested the following scenario and the Data method works as expected: 

@(Html.Kendo().MobileView()
        .Name("grouped")      
        .Title("ListView")
        .Layout("databinding")
        .Content(obj =>       
            Html.Kendo().MobileListView()
                .Name("grouped-listview")
                .TemplateId("template")               
                .FixedHeaders(true)
                .DataSource(dataSource =>
                    dataSource
                        .Read(read => read.Action("GroupedData", "Mobile_ListView").Data("additionalInfo"))
                        .Group(group => group.Add("Letter", typeof(string)))
                )
        )       
)

public ActionResult GroupedData([DataSourceRequest] DataSourceRequest request, int UserID)
       {
        ...
       }

<script>
    function additionalInfo() {
        return {
            userID: 42
        };
    }
</script>
Regards,
Boyan Dimitrov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>