Telerik Forums
Kendo UI for jQuery Forum
2 answers
108 views
Hello,

Let's take the following example (3 views: one view with 2 buttons that when clicked redirects the app to the other views, each of them containing a grid):

<body>
    <div id="mainPage" class="k-content" data-role="view">
        <a data-role="button" href="#example1">Test 1</a>
        <a data-role="button" href="#example2">Test 2</a>
    </div>
 
     <div id="example1" class="k-content" data-role="view">
            <div id="grid1"></div>
            ....
    </div>
 
     <div id="example2" class="k-content" data-role="view">
            <div id="grid2"></div>
             .....
    </div>
 
    <script>
        var app = new kendo.mobile.Application(document.body);
    </script>
 
</body>
After pressing one of the 2 buttons in the top the app will navigate to one of those 2 views that have a grid inside (The scripts to create the grids and other data is omitted). When trying to filter a grid's column the app will navigate to a new view that contains the filter view ( or the column menu, depending on the settings of the grid). After pressing one of the buttons in the Filter view (Clear, Filter, Cancel)  the app is redirected to the initial view when the app started which is: "mainPage" view. Why is this happening? Why doesn't it redirect me to the previously view (the view with the grid that triggered this filtering) ?
My application is much more complex than that, but I've reduced the problem to this simple example.
Can I override this behavior of the grid's filtering on Mobile applications, and set the normal web one with dropdown ? 

Thanks,
Walid

Walid
Top achievements
Rank 1
 answered on 09 Dec 2013
3 answers
252 views
I have a  Grid read method that throws this error on the ToDataSourceResult line at the bottom.   
The context.Search_All method is a SQL Stored Procedure in the context object.    

Any suggestions?
             
  public ActionResult Search_Read([DataSourceRequest]DataSourceRequest request, SearchInputModel input)
        {
            var username = _identityService.UserID;
            using (var context = new eEntities.eWJB())
            {
                context.Configuration.ProxyCreationEnabled = false;

                
                IQueryable search = context.Search_All("a", "b", "c", "d", "1", true)
              .AsQueryable()    
              .Select( item => new SearchResultModel
                                      {
                                          ID1 = item.ID1,
                                          ID2 = item.ID2,
                                          1D3 = item.ID3,
                                          Name= item.Name,
                                          Name2= item.Name2});
                var result = search.ToDataSourceResult(request);        <--- Error Here
          
                return Json(result, JsonRequestBehavior.AllowGet);
            }

        }
          
Daniel
Telerik team
 answered on 09 Dec 2013
2 answers
129 views
The commented part of the code does work, but when I try to group my own stuff it fails.

http://mobile.zuol.ch/api/t_links/getLinks

Is my group: simply at the wrong place or what am I doing wrong?

Markus

var dataSource = new kendo.data.DataSource({
    type: "json",
    transport: {
        read: {
            url: "http://mobile.zuol.ch/api/T_links/GetLinks",
            data:{
                Accept: "application/json"
            },
            group:{
                field: "Kategorie"
            }
        }
    }
     
     
        
      /*     data: [
      { name: "Sashimi Salad", description: "Organic greens topped with market fresh sashimi, wasabi soy vinaigrette.",  letter: "S" },
      { name: "Seaweed Salad", description: "A nice seaweed salad.",  letter: "S" },
      { name: "Edamame", description: "Boiled soy beans with salt.",  letter: "E" },
      { name: "Maguro", description: "Tuna pieces.",  letter: "M" },
      { name: "Tekka Maki", description: "Tuna roll with wasabi.",  letter: "T" },
      { name: "California Rolls", description: "Crab sticks, avocado and cucumber.",  letter: "C" }
    ],
    group: { field: "letter" } */
});
 
function LinksListviewInit() {
    $("#filterable-links").kendoMobileListView({
        dataSource:  dataSource,
        template: $("#links-template").text(),
        headerTemplate: $("#links-header-template").text(),
        filterable: {
            field: "Kategorie",
            operator: "startswith",
            placeholder: "Tippen Sie hier um zu filtern ..."
        },
      
    });
}
Alexander Valchev
Telerik team
 answered on 09 Dec 2013
1 answer
961 views
It appears that when you call options.success within the success callback of the Data Source Update, it will reset the grid scollbar to the top.  For example, if I scroll down several records and edit a record, the scrollbar will jump back to the top rather than staying where it was.  Is there a way to keep the scrollbar from jumping back to the top?

success: function(result) {
    // notify the data source that the request succeeded
    options.success(result);
}

Thanks,
Blake
Rosen
Telerik team
 answered on 09 Dec 2013
4 answers
243 views
I  think the title says it all.  No HeaderTemplate shows up in the resulting web page. I also searched the browser debug window to make sure it wasn't just hidden but there. It's not rendered at all:

@(Html.Kendo().DropDownList()
   .Name("CompanyId")
   .DataValueField("Id")
   .DataTextField("Name")
   .BindTo(Model.CompanyList)
   .HtmlAttributes(new { style = "width: 200px; z-index: 10004;" })
   .Height(300)
   .OptionLabel("Select a company")
   .Events(e => e.DataBound("dataBound"))
   .HeaderTemplate("<div>FOO BAR</div>")
   .Template("<span class=\"k-state-default\">" +
                          "<h5 style=\"display: inline-block; width: 190px\">#: data.Name #</h5>&nbsp;&nbsp;" +
                          "<p style=\"display: inline-block; width: 100px\">#if(data.ContactName) {# #=data.ContactName# # } else {# #}#</p>&nbsp;&nbsp;" +
                          "<p style=\"display: inline-block; width: 100px\">#if(data.PhoneFormatted) {# #=data.PhoneFormatted# # } else {# #}#</p>" +
                       "</span>"
   )
)
Georgi Krustev
Telerik team
 answered on 09 Dec 2013
1 answer
78 views
Hi

I'm working in a large corporate and I'm interesting in new web frameworks for our web applications.
I really impressed from Kendo UI web components .
I couldn't find out if following capabilities embedded in Kendo UI components:
If you do, I would like to get references to articles and examples for those capabilities:

1. Out of the box Localization for all components.
2. Supporting roles (hide / show or disable / enable components based on users' roles.
3. Accessibility 

* I prefer to work with the HTML / JavaScript/ Client side package, but if the JSP tag library support those feature I also like to know about it.

Thanks in advance
Alexander Valchev
Telerik team
 answered on 09 Dec 2013
3 answers
244 views
can anyone give an example?  
Can user select a rectangle area with mouse, and then kendo chart zoom into the area?
Jianxun
Top achievements
Rank 1
 answered on 09 Dec 2013
5 answers
224 views
I'm trying to achieve essentially a drill-down menu within the drawer that behaves just like the Kendo splitview demo.  http://demos.kendoui.com/mobile/splitview/index.html#/

I have a top level list that when clicked should show a next level of items, and then finally when the last level item is clicked I want to load content in the main view.  Rather than having the menu in a pane of the splitview I want to use the drawer to have it slide out and let the user drill down in the drawer until the final item is clicked.  Perhaps simply being able to prevent the drawer from closing would suffice.
Petyo
Telerik team
 answered on 09 Dec 2013
1 answer
173 views
Hi,

When ever there is a empty string value in dropdown list, it is not appearing in the dropdown list. Please see the screen shot below ( the blue color line is the empty string item)... it is not shown properly

Thanks,
Shobana
Dimiter Madjarov
Telerik team
 answered on 09 Dec 2013
1 answer
165 views
Hello again,
how can i select a grid row,based on the value or the text of a dropdownlist?

first of all,i looked over the demo api on kendo site, and the code
@{
    ViewBag.Title = "GridApi";
}

<h2>GridApi</h2>
<div id="grid"></div>
<script>
    $("#grid").kendoGrid({
        columns: [
    { field: "name" },
    { field: "age" }
  ],
        dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 },
  ]
    });
    var grid = $("#grid").data("kendoGrid");
    var row = grid.tbody.find("tr:eq(0)"); OR variant 2: var rowIndex=1;row = grid.tbody.find(">tr:not(.k-grouping-row)").eq(rowIndex);
    var data = grid.dataItem(row);
    grid.select(row);
    console.log(data.name); // displays "Jane Doe"
</script>

i attached a picture with the error in firebug.
Dimiter Madjarov
Telerik team
 answered on 09 Dec 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?