Telerik Forums
Kendo UI for jQuery Forum
0 answers
97 views
Hello Everyone,

grid is loading very slow when database records are more then 15000

i developed one kendo ui grid,
but sometimes i got the error like "jsonmaxlength exceeded "
for this error i given maximum length in web.config file, when i got this error my database has 36500 rows .


This is my webmethod:
     WebService :    analytics.asmx

    <WebMethod(enableSession:=True)> _
    Public Function BindStyles() As String
           Dim dsresult As DataSet = Charts.BindStyles()
            Dim lst As New List(Of stylelookup)
            If dsresult IsNot Nothing AndAlso dsresult.Tables.Count > 0 AndAlso dsresult.Tables(0).Rows.Count > 0 Then
                lst = (From p In dsresult.Tables(0).AsEnumerable Select New  _
                                               stylelookup With _
                                               {.Color = CStr(p("color")).Trim, .Description = CStr(p("desc")).Trim, .Division = CStr(p("division")).Trim, .Group = CStr(p("group")).Trim, .primkey = CInt(p("primkey")), .Scale = CStr(p("scale")).Trim, .Season = CStr(p("season")).Trim, .selectstyle = CBool(p("select")), .Status = If(CStr(p("status")).Trim.ToLower.Replace("a", "") = "", "Active", "In-Active"), .Style = CStr(p("style")).Trim, .Whlprice = CDec(p("whlprice")), .Year = CInt(p("year"))}).ToList
            End If
            Dim objser As New JavaScriptSerializer()
            Dim json As String = objser.Serialize(lst)
            obj = New KendoData
            obj.StyleJSON = json
            obj._time = Date.Now
            Session("kendodata") = obj

            Return json

        Else
            obj = Session("kendodata")
            Return obj.StyleJSON
        End If
    End Function

and this is my default.aspx:

 function webmethod() {
//analytics=webservice name
               analytics.BindStyles(succ, failed);
    }
    function succ(res) {
        data = eval(res);
        load();
    }
    function failed(ex) {
      
        alert(ex._message);
    }


    function load() {
                      $("#grid").kendoGrid({
            dataSource: {
                data: data,
                pageSize: ((__gridH - 30 - 30) / 35),
                serverPaging: true, serverFiltering: true, serverSorting: true
            },
            dataBound: function (arg) {
                ___gridobj = this;
                $("#totalcount").html('' + this.dataSource._data.length + '');
                Pageing(this._data, this._data.length);

            },
            height: __gridH,

            scrollable: true,
            sortable: true,
            filterable: true,
            pageable: true,

            columns: [
         { title: "Select", width: "50px", filterable: false, sortable: false, template: '#= mycheckbox(primkey,selectstyle)#'
         },
                            {
                                field: "Style",
                                width: "100px",
                                title: "Style"
                            },
                            {
                                field: "Color",
                                width: "60px",
                                title: "Color"
                            },

                            {
                                field: "Description",
                                width: "120px",
                                title: "Description"
                            },
                            {
                                field: "Division",
                                width: "50px",
                                title: "Div"
                            },
                             {
                                 field: "Season",
                                 width: "70px",
                                 title: "Season"
                             },
                            {
                                field: "Scale",
                                width: "60px",
                                title: "Scale"
                            },
                             {
                                 field: "Status",
                                 width: "70px",
                                 title: "Status"
                             },
                             {
                                 field: "Group",
                                 width: "50px",
                                 title: "Grp"
                             },
                            {
                                field: "Whlprice",
                                width: "70px",
                                title: "WhlPrice"

                            },
                            {
                                field: "Year",
                                width: "40px",
                                title: "Year"
                            }

                      ]
        });
        return false;
    }

i attached my grid,

Can you explain how to bind grid with parameter like take ,skip,page,pagesize
Ganesh
Top achievements
Rank 2
 asked on 15 May 2012
1 answer
64 views
Hi,

Is there a way of associating metadata with the items that are added to the PanelBar?
My requirement is to associate a guid along with a PanelBar item that I can use when the item is selected.

Regards
Sarvesh
Kamen Bundev
Telerik team
 answered on 15 May 2012
3 answers
227 views
I am trying to add an autocomplete editor to a grid. I have tried to replicate the simplest example possible.

http://jsfiddle.net/grippstick/YKA2c/34/ 


The main problem is that when you select something in the auto complete the first time it just blanks it out. In the samples that are provided they never seem to use the normal scenario where you have an id and a name.

The other huge problem is that it displays the ID first and not the name.

Can anyone help with this? 
John
Top achievements
Rank 1
 answered on 15 May 2012
0 answers
71 views
Hi I´m writing this after not finding any answers on Kendoui.com faq section.

1. Can i have grid widget on mobile?
2. If no can i customize ListView control and have several columns?

What alternative solutions can i use for mobile viewing datagrids on mobile?

Sincerly 
agh
arnorgauti
Top achievements
Rank 1
 asked on 14 May 2012
0 answers
88 views
Hi:

Does anyone know how to make the grid column long title wraps around on multiple rows?

Currently it is chopped off for long title.

Thanks

Johnson Leong
Top achievements
Rank 1
 asked on 14 May 2012
2 answers
141 views

hello please excuse my English :)

I have a grid in which I want to send a value to another asp page and take the data from that page.

I have a button of the grid in a form from which I make a redirect to the asp page and from there take the value creating html objects in a container I put the value which has a field that I have next to the grid in asp page tome that data and do the update of the value in a table.

My problem is that when I make shipments only works if I make the example with the first field and makes the update in the table but if I do the same with the second field of the grid no longer works.
the same goes for the second forward.
      <script src="datoss.asp"></script>
<
div id="domSelection" style="width:620px; height:300px"></div>
 
                       <script>
                  $(document).ready(function() {
                    $("#domSelection").kendoGrid({
                        dataSource: {
                            data: FuncionDellenado3()
                            
                        },
                        selectable: "multiple",
                        pageable: true,
                        scrollable: true,
                        navigatable: true,
                       columns: [
                           { field: "FirstName", title: "productos", format: "{0:c}", type:"String",editable: false, width: "150px" },
                            { field: "City", title: "cantidad", editable:true, type:"Number", validation: { min: 1, required: true },width: "150px" },
                            {field: "BirthDate", title: "fecha de Entrega",type:"String",editable:true,width:"150px"},
                            { field: "favoritos", title: "favoritos", editable:true, type:"String",width: "150px" },
                            {field: "boton", template: "#=  '<form id=\"form3\" method=\"post\" action=\"activauno.asp\"><input type=\"submit\"id=\"boton3\" class=\"boton3\" value=\"3\"/></form>' #", title: "favorito", width: "100px",type:"String", editable:false },                         
                            { field: "añadir", template: "#= '<input type=IMAGE SRC=\"add.gif\"\id=\"añadir\" value=\"CODE\" />' #", title: "añadir", width: "210px",type:"String", editable:false }],
                            editable: true
                    });
                        });
            </script>
 <script>
     
             $(document).ready(function(){ 
$('.boton3').click(function() {
             var x=document.getElementById("boton3").value;
              
             var sourcegrid = $('#domSelection').data('kendoGrid');      
             
            sourcegrid.select().each(function () {
             
               var dataItem = sourcegrid.dataItem($(this));
                var column = dataItem.favoritos;
                    var nomb = dataItem.FirstName;
                fi = document.getElementById('form3');
  
            contenedor = document.createElement('div');
            contenedor.id = 'div1';
            fi.appendChild(contenedor);
   
            ele = document.createElement('input');
            ele.type = 'text';
            ele.value = column;
            ele.name = 'favo';
            ele.id = 'campo';
            contenedor.appendChild(ele);
                 
                ele = document.createElement('input');
            ele.type = 'text';
            ele.value = nomb;
            ele.name = 'nomb';
            ele.id = 'campo2';
            contenedor.appendChild(ele);
                 
                     });
                     
            });
                     
    });
    </script>

and my code asp
<%
 
  Dim clientes, nombre2, nombre, material
  
     
nombre2 = Request("nomb")
response.write(nombre2)
nombre = Request("favo")
response.write(nombre)
nombre2=Replace(nombre2,"Ñ","?")
%>
please help!


regards.
Ricardo
Top achievements
Rank 1
 answered on 14 May 2012
1 answer
232 views
Hi,

I am now working on a project that displaying charts for my client.

The page works great on computer, but when I tested it on iPad, the problem occurs as follow:

- Since I have to add the drop down list with scolller on my page, I checked this page here and it says I need to include kendo.fx.min.js.
- I also have a structure like below, where "fix_width" is set to a fix width and set to "overflow: scroll", and "chart" is for drawing a column chart. Therefore, if the chart's width is larger than "fix_width", I can still check the rest part by scrolling on iPad. But since I include kendo.fx.min.js and after I scroll the chart on iPad, the rest part of the chart doesn't display completely, unless I select one of the data column (which I know all the data are there but just some columns are not displaying). If I remove kendo.fx.min.js, the chart works fine but the drop down list can't scroll any more.

Are there any solution about this?

Thanks a lot in advance!
<div id="fix_width">
    <div id="chart"></div>
</div>
Iliana Dyankova
Telerik team
 answered on 14 May 2012
0 answers
107 views
i want bind the data to listview through pagemethods, but it is not binding.
1. can i use pagementhod for lisview databinding ?

Please check the code and give me the suggestions......

<div data-role="view" id="listview-templates" data-title="ListView" data-init="mobileListViewTemplatesInit">
        <ul id="custom-listview">
        </ul>
    </div>

function mobileListViewTemplatesInit() {
            PageMethods.GetEventTrainees(function (response) {
                groupedData = response.split("#");
            });
            $("#custom-listview").kendoMobileListView({
                dataSource: kendo.data.DataSource.create({ data: groupedData }),
                template: $("#customListViewTemplate").html()
            });
        }
Srinivasulu
Top achievements
Rank 1
 asked on 14 May 2012
5 answers
172 views
Hi,

I have the following scenario:
- Data is bound to a ListView
- When the user clicks on an item in the ListView, he/she should be redirected to a new view (page)

The problem is that the click event is fired each time I scroll up or down in the ListView.

How do I implement a ListView that allows you to scroll up or down, and upon click redirects the user to a new view?


//Marcus
Alexander Valchev
Telerik team
 answered on 14 May 2012
0 answers
53 views
Hi all,

when i went through Kendo UI web,i found that it helps us in enabling the touch enabled desktop environment.I found it confusing here that when it tells about the touch features,it is a native feature of the Operating system.I do not understand how it helps in touch enabled desktop environment.
Swarup
Top achievements
Rank 1
 asked on 14 May 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?