Telerik Forums
Kendo UI for jQuery Forum
2 answers
126 views
hello
I have a function to which you want to add a checkbox to have a function but this function need to pass the name of my form will add it to function with the single quote '
but when added to the grid do not show me anything the grid
how I can add the name of my form but show me what the grid

in a post showing how to add html elements to the grid in the property template
template: "#= kendo.toString(\'<form name=\"form_r\" method=\"post\" action=\"activauno.asp\" onSubmit=\"return enviarForm();\">
<input id=\"radio-01\" type=\"checkbox\" name=\"enviar\" value=\"1\" onClick=\"SelectedCheckBox(this,'form_r',1);\"/>
<button id=\"boton\"name=\"boton\" type=\"submit\">
</button> </form>\') #"


greetings and thanks in advance
Ricardo
Top achievements
Rank 1
 answered on 02 May 2012
0 answers
101 views
Basically, I need to be able to have a grid that manages a heterogeneous collection of two different kinds of objects. To give you some context, I need to be able to handle contact information for both individuals and groups. While they share most of their info, they differ in that individuals have both a first name and last name, while a group has only one name. So I am faced with the problem of how to handle editing for both types of objects in the same grid. 

Is that enough information, or do you need more? Does anyone have any suggestions on how to handle this tricky problem?

Thanks. 
Joshua
Top achievements
Rank 1
 asked on 02 May 2012
0 answers
159 views
Hi,

I am looking to a MCV example for kendo Grid where I can have Paging Sorting and Filtering on server side.
I have implemented the filtering option on server side in my code Here is my Code

/// On Server 
public class GridCommand
    {
        public FilterExpression Filter { get; set; }       
    }


    public class FilterExpression
    {
        public string Logic { get; set; }
        public IEnumerable<GridFilter> Filters { get; set; }
    }


    public class GridFilter
    {
        public string Operator { get; set; }
        public string Field { get; set; }
        public string Value { get; set; }
    }

public ActionResult GetContracts(GridCommand command)
        {
//Some Code
            return Json(list, JsonRequestBehavior.AllowGet);            
        }


////On Client
$("#grid").kendoGrid({
                        dataSource: {
                            type: "jsonp",
                            transport: {
                                read: {
                                    url: "/Test/GetContracts"
                                },
                                parameterMap: function(options) {                       
                 var result = {};
                 if (options.filter) {
                     result["filter.logic"] = options.filter.logic;
                     var filters = options.filter.filters;
 
                     for (var idx = 0, length = filters.length; idx < length; idx++) {                               
                         result["filter.filters[" + idx + "].operator"] = filters[idx].operator;
                         result["filter.filters[" + idx + "].field"] = filters[idx].field;
                         result["filter.filters[" + idx + "].value"] = filters[idx].value;                               
                     }                          
                 }                       
                 return result;
             }
         
                            },
                            schema: {
                                model: {
                                    fields: {
                                        AccountName: { type: "string" },
                                    AccountNumber: { type: "string" },
                                        ContractName: { type: "string" },
                                        ContractNumber: { type: "string" },
                                        ContractProductType: { type: "string" }
                                    }
                                }
                            },
                            pageSize: 10,
                            serverPaging: true,
                            serverFiltering: true,
                            serverSorting: true
                        },
                        filterable: true,                                               
                        pageable: true,
                        height: 400,                        
                        columns: [
                            { field: "AccountName", title: "Account Name", width: 150 },
                            { field: "AccountNumber", title: "Account Number", width: 150 },
                            { field: "ContractName", title: "ContractName", width: 150 },
                            { field: "ContractNumber", title: "Contract Number", width: 100 }
                        ]
                    });
                });

All I want when any action perfor in grid like sorting,Filtering or paging my "GridCommand command" have that option on server.

How can I modify  parameterMap: function(options) {    } function to send all option on server in GridCommand .



Anilesh
Top achievements
Rank 1
 asked on 02 May 2012
0 answers
135 views
Is Kendo UI compatible with salesforce..???
Vishnu
Top achievements
Rank 1
 asked on 02 May 2012
10 answers
1.6K+ views
I have the need to use a third-party widget (https://github.com/harvesthq/chosen/) in a data template but am unsure of how to instantiate it. It basically wraps a multi-select element, which is simple enough, but I need this auto-generated from my view model.

In Knockout, there's an "afterRender" event that I can use to call into my view model, passing the newly created HTML elements. Does anything like this exist in Kendo's MVVM framework?

For most of the Kendo widgets, I seem to be able to use the data-role attribute to handle widget creation.

Thanks
Mark
Top achievements
Rank 1
 answered on 02 May 2012
1 answer
266 views
Is there a way to change the validation on a field in the datasource after the datasource has been bound to a grid?

These two approaches don't work although I see the properties get updated.

var datasource = $("#customers").data("kendoGrid").dataSource;
datasource.options.schema.model.fields.Forename.validation = { required: false };
datasource.options.schema.model.fields.Surname.validation.required = false;
 
$("#customers").data("kendoGrid").refresh();
Iliana Dyankova
Telerik team
 answered on 02 May 2012
0 answers
136 views
I've added a PanelBar to a view and have it working.  However, I am unable to get this panel bar to fill all available space, without hard codin pixel values, instead of just being as large as content within.

<head>
    <title></title>
    <script src="kendoui.mobile.2012.1.406.commercial/js/jquery.min.js" type="text/javascript"></script>
    <script src="kendoui.mobile.2012.1.406.commercial/js/kendo.mobile.min.js" type="text/javascript"></script>
    <script src="kendoui.web.2012.1.322.commercial/js/kendo.panelbar.min.js" type="text/javascript"></script>
    <link href="kendoui.web.2012.1.322.commercial/styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="kendoui.web.2012.1.322.commercial/styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="kendoui.mobile.2012.1.406.commercial/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div data-role="view" data-title="Views">
    <header data-role="header">
        <div data-role="navbar">
            <span data-role="view-title"></span>
            <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
        </div>
    </header>
    <ul id="panelBar">
    <li>
        Item 1
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
        </ul>
    </li>
    <li>
        Item 2
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
        </ul>
    </li>
</ul>
</div>
<script>
    var app = new kendo.mobile.Application(document.body);
    $(document).ready(function () {
        $("#panelBar").kendoPanelBar();
    });
</script>
</body>
</html>
Benjamin
Top achievements
Rank 1
 asked on 02 May 2012
1 answer
131 views
Hello, I am trying to get the Hello World example from http://www.kendoui.com/documentation/mobile/application/overview.aspx to work in a Visual Studio 2010 ASP.NET project.

i created a new aspx page called 'Mobile.aspx' and included all the Kendo js files and Scripts.
I tried to "aspify" the Hello World example, but when I run it via F5 (and it is displayed in Chrome) I just see the content from the default Site.master page, and just the text
Header
Hello world!
Footer
in the content area.  I see nothing that looks like a Kendo mobile app.

Here is my attempt at "aspification" of the Hello World app.  The Intellisense doesn't like the 'data-role' attribute, but I suspect my problems are much more basic.
--------------------------------------------------------------
<%@ Page  Title="Mobile" MasterPageFile="~/Site.master" Language="C#" AutoEventWireup="true" CodeFile="Mobile.aspx.cs"
    Inherits="Mobile" %>

<asp:Content ID="HeadContent" runat="server" ContentPlaceHolderID="HeadContent">
    <title>Kendo Mobile Test</title>
    <!-- Kendo UI Web styles-->
    <link href="styles/kendo.dataviz.min.css" rel="stylesheet" type="text/css" />
    <!-- Kendo UI Web scripts-->
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/kendo.dataviz.min.js" type="text/javascript"></script>-->
    <script src="content/console.js" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

   <div data-role="view">
     <div data-role="header">Header</div>
     Hello world!
     <div data-role="footer">Footer</div>
   </div>

   <script type="text/javascript" src="js/kendo.mobile.application.min.js">
       var app = new kendo.mobile.Application(); //document.body is used by default
   </script>

</asp:Content>
--------------------------------------------------------------

Thank you,
Tim
Tim
Top achievements
Rank 1
 answered on 02 May 2012
13 answers
1.5K+ views
Sample jsFiddle here: http://jsfiddle.net/latenightcoder/R4mKu/3/ 

Try selecting a new option and then canceling when the confirm dialog pops up. (This sets it back to the old value using the value method). Now, try selecting a new option and the change event doesn't trigger.
Richard
Top achievements
Rank 1
 answered on 02 May 2012
8 answers
689 views
Hi,

I am trying to load a different page on the first,second, and third tab when a drop down list selected item changes.I followed the solution at (http://www.kendoui.com/forums/ui/tabstrip/change-url-of-tab-content.aspx) but the code does not seem to work.

<script type="text/javascript">
$(function () {
  $("#AlliancesSummaryFormModel_CodeShare").change(function () {
$($('#timelineTabStrip').find('a.k-link')[0]).data('contentUrl', '/AlliancesPerformancePortal/Flown/AlliancesSummary/Q/2015/1/All/AED');
 
            });
        });
 
    </script>

The find method return value evaluates to an object which means it not null, but the call to .data('contentUrl',url) does not load the new URL content.

Thanks

Madani
Kamen Bundev
Telerik team
 answered on 02 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?