Telerik Forums
Kendo UI for jQuery Forum
1 answer
75 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.3K+ 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
210 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
1.0K+ 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
71 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
314 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
134 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
1 answer
137 views
My customer, a bank, is used to (and it looks like it is a common behaviour) let users insert some special characters, in numeric boxes, to simplify and speed up typeing.
Notably, the use 'k' for 1.000, and 'm' for 1.000.000: so, to insert for example 1500000, the user can type '1.5m', obtaining the same result (and with minor chance of error).
Can I implement anything like that, in the NumericTextBox?
Thanks as always
Andrea
Georgi Krustev
Telerik team
 answered on 11 Jun 2013
4 answers
1.0K+ views
Hi there,

need to search kendo ui grid by text box. please let me know is possible.

Thanks,
Rajesh.C

Alexander Valchev
Telerik team
 answered on 11 Jun 2013
1 answer
116 views
hi guys.
last friday i  purchase icenium developer license and kendo web license. till friday i use the icenium and kendo web in my test apps  with trial license so i didnt publish them. now after purchasing, when i try to use kendo.web.js file in my project i get messed style in mmy app..
when i use kendo.all.min.js file instead of kendo.web.js everything is fine...
anyone know why?
best regards
 maor
Steve
Telerik team
 answered on 11 Jun 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?