Telerik Forums
Kendo UI for jQuery Forum
1 answer
215 views
I have an issue where the style for the editor is getting set with a width of 0. This is not inherited from any other css style but being set by the kendo UI. 

This is the rendered HTML after calling the editor method:
<table class="k-widget k-editor k-header" cellspacing="4" cellpadding="0" style="width: 0px; height: 0px;">


Here is the code for the control"

<textarea id="editor" rows="10" cols="30" data-bind="value: Notes"></textarea>
<script type="text/javascript">
    $(document).ready(function () {
        $("#editor").kendoEditor();
    });
</script>
Dimo
Telerik team
 answered on 11 Apr 2012
2 answers
487 views
I have a grid where one of the cells uses a custom editor to bind to a DropDownList.  The column is bound to a "DepartmentName" property and the DropDownList binds to an associated "DepartmentId" value from my model.  After the user edits the cell, I want it to show the dirty indicator.  It doesn't happen automatically, which I think is because the column property doesn't match the edit control's id.  But is there a way to force the cell to render as dirty?

Thanks for your help.

Regards,
Brian
Brian Roth
Top achievements
Rank 1
 answered on 11 Apr 2012
3 answers
919 views
Attached is a sample page where I've instantiated a combobox and set the text so that the appropriate item is selected.  Problem is that it seems the control still thinks internally the first item is selected because if won't fire when selecting the first item, but will fire if i select any other item including the currently selected item.

Once the event fires from user selection, it seems to work correctly.

I've tried this with the .select function as well and get the same behavior.

Thanks
Georgi Krustev
Telerik team
 answered on 11 Apr 2012
2 answers
229 views
I am testing a REST call from my server to load a Data Source, and my REST service returns the JSON data like this:

{"person":[{"address":"Address1","name":"Person1"},{"address":"Address2","name":"Person2"},{"address":"Address3","name":"Person3"}]}

This has been okay for some other frameworks I'm testing, with the use of a "root" setting that tells the datasource to grab the JSON object that is "person".

Here is my Kendo code:

$(document).ready(function() {
 
   $("#grid").kendoGrid({
      dataSource: {
         transport: {
            read: {
               url: myURLFunc(),
               dataType: "json"
            }
         },
         schema: {
            model: {
               fields: {
                  name: {},
                  address: {}
               }
          }
      }
   },
   height: 250,
   sortable: true,
   columns: [
      {
         field: "name",
         title: "Person"
      },
      {
         field: "address",
         title: "Address"
      }
      ]
   });
});

Is there anything I can do differently to have the Kendo Data Source load the JSON I currently have?
Zach
Top achievements
Rank 1
 answered on 11 Apr 2012
3 answers
129 views
I find that the following code is causing script errors:

        $("#my-k-grid").kendoGrid({
            dataSource: {
                data: mydata
            },
            change: onMyRowSelected,
            selectable: "multiple, row",
            pageable: false,
            scrollable: true,
            navigatable: true,
            columns: mycols
        });

If I trap the exception, I get a TypeError: "Object doesn't support this action"

If i comment out the use of the selectable option, I don't get an error, however cells are selectable and I would prefer multiple row selection.

I am using the 2012Q1 build.  Everything was previously working correctly using the 2011Q3 build.

EDIT: I am trying to use the kendo chart elsewhere on my page.  Therefore I have the following included in addition to kendo.web.min.js:
kendo.core.min.js
kendo.data.odata.min.js
kendo.data.xml.min.js
kendo.data.min.js
kendo.dataviz.core.min.js
kendo.dataviz.vml.min.js
kendo.dataviz.svg.min.js
kendo.dataviz.chart.min.js

If I remove these script includes, I do not get the 'selectable' error however my chart doesn't load.

Previously When I was on 2011Q3 I would just include kendo.all.min.js but that is not available to me anymore.
Mike
Top achievements
Rank 1
 answered on 11 Apr 2012
1 answer
94 views

When creating a listview without specifying a template (ok, not very real situation, but still....) you get an error

In this lines:

that.template = kendo.template(options.template || "");
that.altTemplate = kendo.template(options.altTemplate || options.template);

 

The second line should be:

that.altTemplate = kendo.template(options.altTemplate || options.template || "");

Regards, Jaap

Nikolay Rusev
Telerik team
 answered on 11 Apr 2012
9 answers
343 views

If I load en-GB, I get a mixed current culture.

<script src="/components/com_hellokendo/js/jquery.min.js" type="text/javascript">
</script> <script src="/components/com_hellokendo/js/kendo.all.min.js" type="text/javascript"></script> <script src="/components/com_hellokendo/js/cultures/kendo.culture.en-GB.min.js" type="text/javascript"></script>
<script type="text/javascript">
kendo.culture("en-GB");
</script>

cultures.current Object { name="en-GB" ... calendars ... patternsObject { d="dd/MM/yyyy" WRONG

Which is the problem?, it seems to be loading the second culture or my browser localization.

Thanks,
Anibal
T3DdYBeR57
Top achievements
Rank 1
 answered on 11 Apr 2012
1 answer
311 views
Hi everybody!
I'm facing a problem on my grid (Kendo Web + PHP + MySQL).

Here's the sittuation:
I'm using a popup editing grid, and almost everything is going well, apart from the "delete" function. If i save a new record, and try to delete it without close the grid, is doesn't happen on my MySQL DB, only on the grid, because when i save, the ID remains as "null" (as ID is a Auto_increment field) on the grid.
Is there anything wrong on my code, or is there anything missing to refresh the ID ( I mean right after i save, it should get the ID from the db).

Please could someone help me?

Thanks in advance.


here's the code on JsFlddle
http://jsfiddle.net/63sCD/4/ 
Rosen
Telerik team
 answered on 11 Apr 2012
1 answer
235 views
Hi,
MVC + kendo
when i select the value from ddl the first chart get data in perfect way
but when i use the chart event its give me error in js 

please any advice  
 
thanks
omar

 <div id="example" >
             <label for="Mun">Mun:</label>
                <input id="Mun"/>
            <div class="chart-wrapper">
            <div id="chart"></div>
            <div id="BarChart"></div> 


            </div>
            <script>

                var transport = {
                    read: {
                        url: "@Url.Action("Read", "Plot")", 
                         type: "POST" 
                    }
                };
                var Muntransport = {
                    read: {
                        url: "@Url.Action("ReadMun", "Plot")", 
                         type: "POST" 
                    }
                };


                     var ReadByLandUsetransport = {
                    read: {
                        url: "@Url.Action("ReadByLandUse", "Plot")", 
                         type: "POST" 
                    }
                };




              
              
                   var PlotByLandUseDataSource = new kendo.data.DataSource({
                    transport: ReadByLandUsetransport                                    
                         
                });
              


                var MunDataSource = new kendo.data.DataSource({
                    transport: Muntransport,
                    sort: {
                        field: "MUNICIPALITYNAME_E",
                        dir: "asc"
                    }
                });
                var PlotDataSource = new kendo.data.DataSource({
                        transport: transport
                         
                    });


                function filterMun() {
                   var dropdownlist = $("#Mun").data("kendoDropDownList");
                   var value = dropdownlist.value();
                     PlotDataSource.filter([
                    
                    {field: "MUNICIPALITYNAME_E",operator: "equals", value:value}
                    
                    ]);
                } 


                   function filterLandUse(e) {
                   PlotByLandUseDataSource.filter([
                    
                    {field: "MAIN_LANDUSE_E",operator: "equals", value:e.category}
                    
                    ]);

                }

         
                      function createChart() {
                      
                        $("#chart").kendoChart({
                        theme: $(document).data("kendoSkin") || "metro",
                        dataSource: PlotDataSource,
                        autoBind: false,                  
                        title: {
                            text: "Elms Application Count Per municibality! "
                        },
                        legend: {
                            position:"bottom"
                        },
                        seriesDefaults: {
                          labels: {
                                visible: true,
                                 format: "{0:N0}"
                            }
                           
                        },
                        series: [{
                            type: "pie",
                            field: "PLOTCOUNTS",
                            categoryField: "MAIN_LANDUSE_E"
                        }],
                        tooltip: {
                            visible: true,
                            format: "{0:No}"
                        },
                        seriesClick: filterLandUse


                    });
                    }


                    function createSubLanduseChart() {
                      
                        $("#Barchart").kendoChart({
                        theme: $(document).data("kendoSkin") || "Metro",
                        dataSource: PlotByLandUseDataSource,
                        autoBind: false,                  
                        title: {
                            text: "Elms Sub Land use! "
                        },
                        legend: {
                            position:"bottom"
                        },
                        seriesDefaults: {
                          labels: {
                                visible: true,
                                 format: "{0:N0}"
                            }
                           
                        },
                        series: [{
                            type: "column",
                            field: "AREAGROUP",
                            categoryField: "SUB_LANDUSE_E"
                        }],
                        tooltip: {
                            visible: true,
                            format: "{0:No}"
                        }


                    });
                    }





                $(document).ready(function() {
                    $("#Mun")
                    .val("Abu Dhabi")
                    .kendoDropDownList({
                            dataSource: MunDataSource,
                            dataTextField: "MUNICIPALITYNAME_E",
                            dataValueField: "MUNICIPALITYNAME_E",
                            change: filterMun
                        });


                 createChart();
                    createBChart();
                    filterMun();                  
  
                       $("#example").bind("kendo:skinChange", function(e) {
                        createChart();
                        createBChart();
                        // 
                        plotDataSource.read();
                        PlotByLandUseDataSource.read();
        
                    });

                });
               </script>
        </div>
Iliana Dyankova
Telerik team
 answered on 11 Apr 2012
3 answers
209 views
Hello,

I am trying to create an editable grid, whose dataSource contains fields with empty strings, which should then be set by the user. However, the Kendo Grid does not seem to support editing of cells whose content is empty.

You can try it out on jsFiddle
Is this a known issue, and how can I bypass it?

Thanks,
Szilard
Alexander Valchev
Telerik team
 answered on 11 Apr 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?