Telerik Forums
Kendo UI for jQuery Forum
3 answers
322 views
Hi Kendo UI Team,

I have a grid with dummy data and a client template. I'm attempting to add new records.
<div id="grid">
</div>
<script id="detail-template" type="text/kendo-ui-template">
    <div>
        <p>#: FirstName # #: LastName #'s age is #: Age #</p>
  </div>
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $("#grid").kendoGrid({
            sortable: true,
            editable: "incell",
            toolbar: ["create"],
            columns:[
                {
                    field: "FirstName",
                    title: "First Name"
                },
                {
                    field: "LastName",
                    title: "Last Name"
                }],
            dataSource: {
                schema: {
                    model: {
                        id: "Id",
                        fields: {
                            FirstName: {
                                type: "string"
                            },
                            LastName: {
                                type: "string"
                            },
                            Age: {
                                //data type of the field {Number|String|Boolean} default is String
                                type: "number",
                                // used when new model is created
                                defaultValue: 1
                            }
                        }
                    }
                },
                data: [
                    {
                        Id: 1,
                        FirstName: "Joe",
                        LastName: "Smith",
                        Age: 30
                    },
                    {
                        Id: 2,
                        FirstName: "Jane",
                        LastName: "Smith",
                        Age: 20
                    }]
            },
            detailTemplate: kendo.template($("#detail-template").html()),
            dataBound: function ()
            {
                this.expandRow(this.tbody.find("tr.k-master-row").first());
            },
        });
    });
</script>
Right now I can only edit the fields defined as grid columns, but not the field in the detail template. How can I fix this?
Alexander Popov
Telerik team
 answered on 31 Oct 2013
1 answer
215 views
If I use the theme called Metro Black and have a resource that sets the background color for the event, the text color is either black or white depending on the background color.  It is not somthing that I set, but seems to be handled in the css.  If I change the theme to Flat, the text color is always white, even if the background color of the event is white and is therefore not readable. 

Is there something I can do to make the Flat theme behave the same way as the Metro Black theme with regards to the event text color?

Thanks,
Dimo
Telerik team
 answered on 31 Oct 2013
1 answer
249 views
Hi:

I'm trying to update the majortick during runtime
I have the following:

<script type='text/javascript'>


$("#doctors").change(function () {

var scheduler = $("#scheduler").data("kendoScheduler");

 scheduler.majorTick(60); //interval of 60 minutes
 
kendo.bind($("#scheduler"), scheduler);
$("#scheduler").data("kendoScheduler").refresh();

});

</script>

Somehow, the code is not updating the intervals as a show in the code.

I appreciate in advance

John
Vladimir Iliev
Telerik team
 answered on 31 Oct 2013
1 answer
60 views
Hi Support,
We want to convert our application to HTML5. I see Kendo UI is the best solution for it, but i found that Kendo UI is only available for ASP.NET MVC base. We don't follow MVC pattern in our current application. I just want to make sure, is Kendo UI available for standard ASP.NET pages, If yes please send me that link and also online demo link, i will explore it in detail.

Thanks
Abu Sufyan
Kiril Nikolov
Telerik team
 answered on 31 Oct 2013
1 answer
334 views
As I have posted here I have a problem with setting dataItem.set() manually.

I have an editable Kendo Grid that may have a column with a checkbox to change a boolean value. I have used this solution proposed by OnaBai that is working perfectly!

The only problem is that the checkbox value change is too slow. When user clicks it, it takes about 1 second to change. I realize that the dataItem.set() method is responsible by this delay.

My grid has a considerable amount of data. About 30-40 columns and 300+ lines. It is defined as follows:

$("#mainGrid").kendoGrid({
    dataSource: dataSource,
 
    pageable: false,
    sortable: true,
 
    scrollable: true,
    editable: true,
    autoBind: false,
    columnMenu: true, // Cria o menu de exibição de colunas
    height: getGridHeight(),
 
    toolbar: [/* hide for brevity */],
    columns: [/* hide for brevity */],
    dataBound: function() { /* hide for brevity. */},
    edit: function() { /* hide for brevity. */}
});
Another detail is that, when dataItem.set() is called, it calls dataBound() event but that is not causing the delay. Grid's edit() method is not being called on this process. I don't know if worths to post dataSource code.

Any help will be very appreciate. Thank you in adv.
Kiril Nikolov
Telerik team
 answered on 31 Oct 2013
1 answer
45 views
Let's say I have maxDateGroups set to 10. If I have data going from January 20 to November 15, this data covers less than 10 months, however my chart will display 11 bars, one for each month from January through November. Same behavior with weeks, and probably all the other baseUnits.
T. Tsonev
Telerik team
 answered on 31 Oct 2013
3 answers
312 views
I have a chart with multiple series (See attached).
I want to list the dates from the series available in the same data.
The problem im experiencing is selecting a category axis value. Setting it on any of the series causes all of the series to not show, but the dates do for all rows.

Json data:
01.[{
02."InStore":{"OrderCount":0,"Sales":0,"Canceled":null},
03."Collection":{"OrderCount":31,"Sales":28290,"Canceled":null},
04."Delivery":{"OrderCount":10,"Sales":15883,"Canceled":null},
05."Combined":{"OrderCount":41,"Sales":44173,"Canceled":1},
06."Date":"\/Date(1381964400000)\/"},
07.{"InStore":{"OrderCount":0,"Sales":0,"Canceled":null},"Collection":{"OrderCount":49,"Sales":31990,"Canceled":null},
08."Delivery":{"OrderCount":18,"Sales":36463,"Canceled":null}
09.…
10.}]
Within this data the chart has 4 series:
Combined.OrderCount;
Collection.OrderCount;
Delivery.OrderCount;
Combined: Sales

for those series I want to use the 'Date' field.
The HTML looks like this:

01.<div class="chart-wrapper" data-role="chart"
02.                data-title="Order Details"
03.                data-theme="bootstrap"
04.                data-legend="{ position: 'bottom' }"
05.                data-series-defaults="{ type: 'line' }"
06.@*                data-category-axis="{
07.                    field: 'Date',
08.                    baseUnit: 'day',
09.                    type: 'date',
10.                    labels: {
11.                        rotation: -90
12.                    },
13.                    majorGridLines: {
14.                        visible: false
15.                    }
16.                }"*@
17.@*                data-category-axis="{
18.                    categories: [1,2,3,4,5,6,7]
19.                }"*@
20.                data-category-axis="{
21.                    labels: { rotation: -90, template: 'Hello' }
22.                }"
23.                data-value-axis="[
24.                    { name: 'orderCount', title: { text: 'Orders' } },
25.                    { name: 'sales', title: { text:'Sales' } }
26.                ]"
27.                data-tooltip="{
28.                    visible: true,
29.                    template: '<div>#: kendo.toString(dataItem.Date, \'dddd\') # #: kendo.toString(dataItem.Date, \'d\')#</div><div>Order Count:#: value #</div>'
30.                }"
31.                data-group="{field:Date}"
32.                data-series="[
33.                    { 'name': 'OrderCount', 'field': 'Combined.OrderCount', 'axis': 'orderCount' },
34.                    { 'name': 'Delivery', 'field': 'Delivery.OrderCount', 'axis':'orderCount', 'type': 'column', 'stack': 'true' },
35.                    { 'name': 'Collection', 'field': 'Collection.OrderCount', 'axis': 'orderCount', 'type': 'column', 'stack': 'true' },
36.                    { 'name': 'Sales', 'field': 'Combined.Sales', 'axis': 'sales', 'type': 'area' }
37.                ]"
38.                data-bind="source: dataSource">
39.            </div>
Any ideas? Setting the categories manually works but I don't want to do it this way as it will be more to maintain and more effort over more charts.

Additionally - why does the legend disappear after the chart gets its data?

Thanks, Matt
Matt
Top achievements
Rank 1
 answered on 30 Oct 2013
0 answers
201 views

web master
Top achievements
Rank 1
 asked on 30 Oct 2013
1 answer
189 views
I have a list view that is created using MVVM style. I am trying to use the "Press to load more" function from KendoUI mobile. I am listing all post from my Wordpress site into a list view that when clicked on it shows a detailed view of the post clicked on. I am using MVVM to accomplish this for now but i am not able to get the list view to load more post from the server using endless scrolling or Press to load more. Here is my full code on Jsbin.com Please help me.
Pavel Kolev
Telerik team
 answered on 30 Oct 2013
3 answers
107 views
I have a very silly problem.

I have a Kendo Grid with Detailed View that can expand/collapse, it works flawlessly and looks good.  The problem is that as soon as I insert a Kendo Line Chart to the page the rows in the Grid can no longer be selected, also not expanding.  I t works well without the Chart within the same page.

I´ve checked the console of Firebug and that does not display any errors.  I also can not detect any events when clicking row within the grid.  It simply will not work.

Do you have any thoughts?  Does Kendo Grid and Chart not work when used on the same page?

Thank you.
Dimiter Madjarov
Telerik team
 answered on 30 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?