Telerik Forums
Kendo UI for jQuery Forum
1 answer
73 views
I was trying to bind a data grid with plain JSON object array and it does not seem to work with grid.

http://jsfiddle.net/63LPg/14/

Can you help me with this?
Daniel
Telerik team
 answered on 12 Jun 2013
1 answer
73 views
Been noticing some weird things with the formatting buttons and how they affect the text

Repro steps:
1. press bold
2. start typing: 'asdf'
3. press italic
4. type more: 'qwert'

Expected:
'asdf' is in bold while 'qwert' is bold and italic

Actual:
'f' is bold and italic

is this a known bug?
Dimiter Madjarov
Telerik team
 answered on 12 Jun 2013
1 answer
77 views
I already have a custom icon font I created and have been using elsewhere that is prepended with 'icon-' instead of 'km-'. I have various reasons for wanting to not switch it to us 'km-' within the tabstrip.

How can I do this?
Kamen Bundev
Telerik team
 answered on 12 Jun 2013
1 answer
44 views
I have a grid below rendered by knockout, and have some pre-defined information returned from server which need to be shown as in footer.
It works fine in ie9, but not ie7/8 by saying "SCRIPT5022: Unable to parse bindings."


I remove header/footerAttributes, the grid is rendered, but the other columns are squeezed to the space below the first column. so I think the exception is caused by footerAttributes, isn't it?

btw, is there a way to setup a rowtemplate for the footer with pre-defined data, instead of setting the aggregation from each column? so that, we can set the grand total regardless of the data of the grid.
I checked http://docs.kendoui.com/api/web/grid, but cannot find any clue...

------------------------------------------------------------------------------------------------------------------------------------
knockout: v2.1.0
jQuery: v1.8.3
jquery-ui-1.8.24

  <div class="ItemsGrid" data-bind="kendoGrid: {
    data: data.Items
    , rowTemplate: 'rowTmpl'
    , columns: [
          { field: 'Product.Description', title: 'Description',width:'40%' 

            , headerAttributes: { style: 'text-align: left;' }
            ,footerAttributes: { class:'ui-widget-header',style: 'text-align: right;'}
            , footerTemplate: function () { return                 'Warehouse Line Item Count: '+data.Basket.Summary.TotalItems +'<br/>Total Line Item Count: '+$root.data.OrderSummary.TotalItems;}
            }
        , { field: 'Product.Price', title: 'Price' 
            , headerAttributes: { style: 'text-align: right;' } 
            , footerAttributes: { class:'ui-widget-header', style: 'text-align: center;' }
            }
        , {
            field: 'Quantity', title: 'Qty', align: 'center',width:'5%'
            , headerAttributes: { style: 'text-align: center;' } 
            ,footerAttributes: { class:'ui-widget-header', style: 'text-align: center;' }
        }
    ]
    , useKOTemplates: true
}"></div>

------------------------------------------------------------------------------------------------------------------------------------
Atanas Korchev
Telerik team
 answered on 12 Jun 2013
23 answers
3.2K+ views
Your examples show your controls.  How about one that shows a whole form?
Jason Marshall
Top achievements
Rank 1
 answered on 11 Jun 2013
1 answer
167 views
Hi Below is my code :

The issue is when I try to add the sections marked as bold I get this exception  The model item passed into the dictionary is of type 'System.Int32', but this dictionary requires a model item of type 'System.String'.

Note : I have a single controller that serves multiple views from multiple controller.


@model IEnumerable<mobiCore.Models.ChecklistApprovalModel>
@{
    ViewBag.Title = "EditApprovals";
 
    }
<h2>Approvals</h2>
 
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
 
 
<style type="text/css">
.detail-title-field{
    width:98%;
    float:left;
    margin:0px 5px;
}
 
.detail-value-field{
    width:98%;
    min-height:1.2em !important;
    background-color: #E3E4FA;
    margin:5px;
    padding:0 2px 0 2px;
    border:1px solid  #728FCE;
    display:block;
    float:left;
}
</style>
 
<div id="generatetsDiv" style="width: 100%;">
 
        
@using (Html.BeginForm("index_approvals", "Checklist"))
{
  
          @(Html.Kendo().Grid(Model)
            .Name("ChecklistGrid")
          .Columns(columns => {
              columns.Bound(p1 => p1.ApprovalID).Title("ApprovalID").Width(10);
              columns.Bound(p1 => p1.ManagerApproval).Title("IsApproved").Width(10);
              columns.Bound(p1 => p1.SubmitterID).Title("SubmitterID").Width(10);
              columns.Bound(p1 => p1.ApproverID).Title("ApproverID").Width(10);
              columns.ForeignKey(p1 => p1.ChecklistItemDateID,
                    (System.Collections.IEnumerable)ViewData["checklistitemdatecoll"],
                    "ChecklistItemDateID", "DateValue").Title("ChecklistDate").Width(50);})
                     
            .ToolBar(toolbar => toolbar.Save())
            //.Editable(editable =>editable.Mode(GridEditMode.InCell))
            .Selectable(select => select.Mode(GridSelectionMode.Single))
            .Pageable()
            .Sortable()
            .Scrollable()
            .Filterable()
            .HtmlAttributes(new { style = "height:430px;" })
            .DataSource(dataSource => dataSource
                .Ajax()
                .ServerOperation(false)
                .Batch(true)
                .Model(model1 =>
                {
                    model1.Id(p1 => p1.ApprovalID);
                    //model1.Field(p1 => p1.ChecklistItemDateID).Editable(false);
                    //model1.Field(p1 => p1.SubmitterID).Editable(false);
                    //model1.Field(p1 => p1.ApproverID).Editable(false);
 
                })
                .Read(read => read.Action("ChecklistApproval_Read", "Checklist"))
                .Update(update => update.Action("ChecklistApproval_Update", "Checklist"))
    )
 
 )
}
    </div>
<script type="text/javascript">
    function error_handler(e) {   
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function() {
                        message += this + "\n";
                    });
                }
            });       
            alert(message);
        }
    }
</script>

Daniel
Telerik team
 answered on 11 Jun 2013
6 answers
980 views
On my home page (see link below), I dynamically build an HTML table of 9 tiles from a SQL database.  I've added a ToolTip widget to display additional information when the user mouses over the tile.

The ToolTip widget is working, however, when I mouse over any of the top 3 tiles, the ToolTip flickers as the mouse moves over it. When I mouseover any of the middle 3 or bottom 3 tiles, the ToolTip works fine.

The difference between the top 3 tiles and the others is that the the top 3 tiles have a very large “Title” text in the <a command.  Is there better way to do this so to avoid the flicker?

http://life-renewal-test.org/    Thanks
Aron
Top achievements
Rank 1
 answered on 11 Jun 2013
2 answers
52 views
Hi there
Just as stated, do i also need (beside Devcraft Ultimate)
an active subscription for Icenium to use Kendo UI Mobile?
Marcel Härry
Top achievements
Rank 1
 answered on 11 Jun 2013
1 answer
277 views
Hi forum readers,

My apologies if my question is rather basic. I am a WPF developer moving in to web development for the first time in many years and am trying to get my head around applying JSON to MVVM to a Kendo UI control.

Background

We are trying to retrieve JSON data from our MVC project. Put it in to the ViewModel and then get a dropdownlist to populate a list of TradeId values.

We have gone through the demo's (e.g. remote binding)  as an FYI.

Question:

Of course like any other person starting off we have run in to an issue. Can anyone shed any light on what we might be doing wrong or missing? 

At present we get an error as follows:

Error: Unable to parse bindings.
Message: ReferenceError: tradesSource is not defined;
Bindings value: source: tradesSource, value: selectedTrade

Our code is as follows:

[code]
<script>
    $(document).ready(function () {
        // ... some unrelated code 
        // Setup ViewModel        
        var crudServiceBaseUrl = "/trades/GetFilteredTrades/";
        
        var viewModel = kendo.observable({
            tradesSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url: crudServiceBaseUrl,
                        dataType: "json"
                    },
                    update: {
                        url: crudServiceBaseUrl,
                        dataType: "json"
                    },
                    destroy: {
                        url: crudServiceBaseUrl,
                        dataType: "json"
                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return {
                                models: kendo.stringify(options.models)
                            };
                        }
                        return options;
                    }
                },
                batch: true,
                schema: {
                    model: {
                        id: "TradeId"
                    }
                }
            }),
            selectedTrade: null,
            hasChanges: false,
            save: function () {
                this.tradesSource.sync();
                this.set("hasChanges", false);
            },
            remove: function () {
                if (confirm("Are you sure you want to delete this Trade?")) {
                    this.tradesSource.remove(this.selectedTrade);
                    this.set("selectedTrade", this.tradesSource.view()[0]);
                    this.change();
                }
            },
            showForm: function () {
                return this.get("selectedTrade") !== null;
            },
            change: function () {
                this.set("hasChanges", true);
            }
        });   
    
        console.log("View Model created");
        kendo.bind($("#form-container"), viewModel);

        console.log("View Model bound to #form-container");
    });
</script>

<div id="form-container">
    console.log("Combobox created");
    <h4>ComboBox</h4>
      
    <select data-role="combobox"
            data-text-field="TradeId" 
            data-value-field="TradeId" 
            data-bind="source: tradesSource, value: selectedTrade">
    </select>
</div>

[/code]

Thanks in advance
Daniel
Telerik team
 answered on 11 Jun 2013
2 answers
96 views
I am making a C# Razor MVC web app which uses kendo UI charts. I have 2 different chart setups on my index view.

3 of my charts pass a single parameter to a function called _GetAttrTop3 which then passes more parameters on to the controller. My 2 other charts don't send a parameter, but fires a function called _GetAttr() which sends parameters to the controller.

The problem is with the 3 charts that pass the parameter to the _GetAttrTop3 function. The parameter that gets passed to the function always gets passed along to the controller but there is always another parameter in that function that gets dropped.

Originally "Shift" was the parameter that wasn't passing, so I made it a session variable to fix the problem, but "Type" stopped getting passed, and now "LineName" isnt passing. So it seems that it always drops one parameter when I try to send it a parameter from one of the 3 WasteCategory#Charts. This is strange because the 2 other charts that dont send a parameter to their respective return function ( _GetAttr() ) work just fine.

attached is my _Layout.cshtml and my view called Index.cshtml
Davin
Top achievements
Rank 1
 answered on 11 Jun 2013
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?