Telerik Forums
Kendo UI for jQuery Forum
3 answers
197 views
I have successfully created a grid using the MVVM pattern. It works great. However, what I'm struggling with is how to use the Grid with a combination of MVVM and the configuration and api methods available from Kendo UI.

For example, I am trying to create a detail row from a master row. The examples don't allow me to do that. Should I be doing something different when coding with this paradigm?
axwack
Top achievements
Rank 1
 answered on 08 Aug 2012
2 answers
358 views
Hey all,

I hit a confusion point recently when working with KendoUI controls inside of forms. 

Lets say I have today's date in my ViewBag (e.g. ViewBag.startDate exists with a valid date).

I've generated this control with the ASP.NET MVC kendo UI:
@Html.Kendo().DatePicker().Name("startDate").Value(@ViewBag.startDate).Format("d")

On the initial form post, this works fine.

Lets say I submit a form, causing a postback that changes the value of "startDate" in my ViewBag (on the server side).
If I print the ViewBag's startDate and then below it, generate my DatePicker control in the same way fashioned above, I get 2 different dates.  The printed one is whatever the server side changed it to, and the Kendo control has the first ViewBag.startDate.

As soon as I generate my control like this (e.g. without the "@" in front of ViewBag):
@Html.Kendo().DatePicker().Name("startDate").Value(ViewBag.startDate).Format("d")
everything seems to be fine between form posts.

This confused me for a good long while yesterday.  Does anyone know why this is?  I'm thinking it's some Razor knowledge that I may be lacking, but I'd think if it worked with or without the "@" on any attempt, it would work on every attempt.

Thanks for any help on why this is!

-Sig
Sig
Top achievements
Rank 1
 answered on 08 Aug 2012
1 answer
145 views
Hello, first excuse me for my bad english. 

Im working with kendoGrid without any problems at webkit based browsers like Chrome or Safari, but when I test the webpage at IE or FF it seems to have some rendering issues with the width of headers and columns. I attach screenshots of both tests and the code snippet.

Thanks 
$("#list_contactos").kendoGrid({                   
    columns: [
    {title: "Móvil", field: "_movil",width: 90},
    {title: "Apellido1", field: "_ape1",width: 150},
    {title: "Apellido2", field: "_ape2",width: 150},
    {title: "Nombre", field: "_nombre",width: 150}
    ],
    dataSource: ds,
    change: function(e) {
        //handler para manejar la seleccion de filas
        var fila = this.dataItem(this.select());
         
        if(fila == null)
            return;
         
        $("#txtMovil").val(fila._movil);
        $("#txtNombre").val(fila._nombre);
        $("#txtApellido1").val(fila._ape1);
        $("#txtApellido2").val(fila._ape2);
         
         
    },
    selectable: "row",
    scrollable: true,
    height: 450   
});
Angel
Top achievements
Rank 1
 answered on 08 Aug 2012
1 answer
235 views
Dear,
I've a treeview with icons as your sample, similar this:
<ul id="treeview" id="myRoot">
<li data-expanded="true"><span class="k-sprite folder"></span>Folder1</li>
<li data-expanded="true"><span class="k-sprite folder"></span>Folder2</li>
<li data-expanded="true"><span class="k-sprite folder"></span>Folder3</li>
</ul>

Then I've try to use append method (link to button for example), similar this:
treeView.append({ text: "Folder4" }, $("#myRoot"));
(it's work but the new node Folder 4 have no icon)

My question is:
How can I append a new node with icon ?
I have try this:
treeView.append({ text: "<span class='k-sprite folder'></span>Folder4" }, $("#myRoot"));
But not work!

Thanks for help,
Rinaldo

Rinaldo
Top achievements
Rank 1
 answered on 08 Aug 2012
5 answers
669 views
I'm using Kendo Upload inside an ASP.NET WebForms page to upload a user picture (not multiple files, only one).

It have a Save button that sends the values of many fields. I would like to send the file together with the values. Is there any way to do it with Ajax? Or with a normal Postback? Can someone please explain me how to do it?
Piyey
Top achievements
Rank 2
 answered on 08 Aug 2012
1 answer
78 views
In our application, we have removed default filtering of kendo ui and have created textboxes with autocomplete on every header column.
But when we select any data entered in textbox and populated in autocomplete and then hit enter key, we are presented with row selected in edit mode as navigatable is on. So our data are not getting filtered. Can anyone suggest what should I do to achieve filter with navigatable on.

Thanks
Vesselin Obreshkov
Top achievements
Rank 2
 answered on 08 Aug 2012
7 answers
947 views
Hi


I am facing two issues with virtual scrolling and server side pagig enabled on Grid.  
 
1. As I drag the scrollbar, multiple posts are being made instead of a post happening after the scrollbar drag is completed. 
For eg.,
Lets say my pagesize is 3000 and I have total 20000 rows. Onload, page 1 data is loaded. Now when I drag the scrollbar all the way to middle, there is a lag experienced in dragging and POST is happening in points of drag. There are 1 or 2 POSTS in the background and when the scrollbar eventually drops to the intended position, another POST happens and grid gets bound to the data returned from last POST.

2. Data loaded across multiple scrolls seem to get retained in the datasource. This is making the grid/page heavy and slow after using the scroll for some time.  I have  monitored the server POST. In the above example, once 6 POSTS have been made with returning the 20000 rows, scrolling doesnt create server posts. Data is being paged locally. 

How do I reset datasource across page loads instead of appending the data recieved into the datasource ?

My grid config is as follows:

 $("#grid").kendoGrid({
        dataSource: {
            type: "json",
            serverPaging: true,           
            serverSorting: true,
            pageSize: 3000,
            allowUnsort: true,
            transport: {
                read: {                  
                    url: "homecontroller/action1",
                type: "post",
                contentType: "application/json; charset=utf-8",
                dataType: "json"
                },
            parameterMap: function (options) {                       
                return JSON.stringify(options);                    }
            },

            schema: { data: "Data", total: "TotalRowCount" }

        },              
        groupable: true,       
        sortable: true,
        pageable: true,
        selectable: "multiple",

        scrollable: {
            virtual: true
        },
 
       columns:
        [
  //column definitions here
 ]
 });



Rosen
Telerik team
 answered on 08 Aug 2012
1 answer
119 views

I've put together a little app using Kendo UI that stores user inputs in a Javascript array, and then prints these items out by adding text to a div. Along with the text, I need to have a delete button to remove these items from the array.

Since I'm adding the delete buttons to the DOM after I initialize Kendo UI, I assume I need to use the.kendoMobileButton() method on each button I add. If I don't do this, my buttons aren't styled correctly, despite being given the attribute data-role="button".

Still, when I try to use these buttons, I can't get them to call a function with data-click="deleteNumber". The function simply doesn't seem to fire. Any hints?

Here is a quick example I threw together that illustrates my problem: http://crocdoc.ifas.ufl.edu/files/kendo_example/

Robin
Top achievements
Rank 1
 answered on 08 Aug 2012
1 answer
97 views
In the past I always found out what was coming next in Kendo via the Road Map. When will that be updated?
Iliana Dyankova
Telerik team
 answered on 08 Aug 2012
1 answer
613 views
This piece of javascript does not work. tabStrip is always undefined!

 


var tabStrip = $("#tabstrip").data("kendoTabStrip");


Here are my References
    <script src="@Url.Content("~/Scripts/KendoScripts/jquery.min.js")" type="text/javascript"></script>
  <script src="@Url.Content("~/Scripts/KendoScripts/kendo.web.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/KendoScripts/kendo.custom.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
Ryan Lege
Top achievements
Rank 1
 answered on 08 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?