Telerik Forums
Kendo UI for jQuery Forum
0 answers
156 views
I got this "string" column first_name, which seems to be validated (it doesn't even have a validation rule specified) in a grid.
When i open the edit popup and change it's value, i get a validation message: "first_name is not valid date"..
This does not happen if i remove the column birthdate or set it's type to be "string"...
In fact.. if i fill a valid date into first_name, and some random string into birthdate, it doesn't complain anymore.. so it seems that even tho birthdate is displayed as a datepicker, it tries to validate first_name.
This also only happens when the editable attribute is set to 'popup' and works with inline editing.
I am pretty amazed at how this can be possible. please help!!!

Code:
$(document).ready(function () {
    var crudServiceBaseUrl = '/participant',
    dataSource = source,
        batch: true,
        pageSize: 30,
        schema: {
            model: {
                id: "id",
                fields: {"id":{"editable":false,"type":"number","label":"ID"},"first_name":{"type":"string","label":"First Name"},"last_name":{"type":"string","label":"Last Name"},"birthdate":{"type":"date","label":"Birthdate"},"social_security_number":{"type":"string","label":"Social Security Number"},"smoker":{"type":"boolean","label":"Smoker"},"vegetarian":{"type":"boolean","label":"Vegetarian"},"miscelaneous":{"type":"string","label":"Miscelaneous"},"active":{"type":"boolean","label":"Active"},"blacklist_comment":{"type":"string","label":"Blacklist Comment"}}            }
        }
    });
 
    $("#grid").kendoGrid({
        dataSource: dataSource,
        width: 1000,
        toolbar: ["create"],
        columns: [{"title":"ID","field":"id"},{"title":"First Name","field":"first_name"},{"title":"Last Name","field":"last_name"},{"title":"Birthdate","field":"birthdate"},{"title":"Social Security Number","field":"social_security_number"},{"title":"Smoker","field":"smoker"},{"title":"Vegetarian","field":"vegetarian"},{"title":"Miscelaneous","field":"miscelaneous"},{"title":"Active","field":"active"},{"title":"Blacklist Comment","field":"blacklist_comment"},{"command":"destroy","filterable":false},{"command":"edit","filterable":false}],
        editable: "popup",
        selectable: "row",
        pageable: true,
        sortable: true,
        groupable: true,
        filterable: true,
    });
});
GungFooMon
Top achievements
Rank 1
 asked on 24 Apr 2012
0 answers
118 views
Hello,

I want to create a grid with a hierarchy. I have clients who have differents missions.
I want to class by mission (number) and have informations about this mission. Informations are in my function "Tableau" and return on json list and contains the mission code.
I pass in parameters a which is a list which contains the missions (differents numbers missions).


function createGridMission(a)
{
 
    var element = $("#gridF01").kendoGrid({
                    dataSource: {
                            data: a,
 
                        pageSize: 6,
                        serverPaging: true,
                        serverSorting: true
                    },
                    height: 450,
                    sortable: true,
                    pageable: true,
                    detailInit: detailInit,
 
                    columns: [
                        {
                            field: "mission",
                            title: "Mission"
                        }
                             ]
                });
 
 
            function detailInit(e) {
                $("<div/>").appendTo(e.detailCell).kendoGrid({
                    dataSource: {
                        transport: {
                            read: {
                                url: "/Mob/Client/Tableau?mission=" + a + "&id=" + $("#hidCodeClient").val(),
                                dataType: "json"
                            }
                        },
                        serverPaging: true,
                        serverSorting: true,
                        serverFiltering: true,
                        pageSize:6,
                        filter: { field: "mission", operator: "eq", value: e.data.mission }
                    },
                    scrollable: false,
                    sortable: true,
                    pageable: true,
                    columns: [
                            { field:"periode", title:"Période" },
                            { field:"debut", title:"Début" },
                            { field:"fin", title:"Fin" },
                            { field: "quantite", title:"Quantité" },
                            { field:"production", title:"Production" },
                            { field:"facturation", title:"Facturation" },
                            { field:"solde", title:"Solde" },
                            { field:"dateSolde", title:"Date solde" }
                        ]
                });
 
    }
 
}
Florian
Top achievements
Rank 1
 asked on 24 Apr 2012
1 answer
202 views
I apologize in advance if this is not the correct part of the forum to post this in.

We have a WCF service running on a server accessible from the internet (which we already use for other things).

Our current idea is to create a small mobile app using Kendo.  The app would call one of the WCF methods to fill in a "list" (e.g. a list of fruits, etc).

As I understand it, Kendo uses html5/css and javascript.  So I guess the question is are we able to do this using kendo?  Have a mobile app call a WCF method (assume for now it has internet access, we will add a check for that later on) and take the returned data to display on the app/page?

Thank you in advance for the information
Alexander Valchev
Telerik team
 answered on 24 Apr 2012
0 answers
242 views
<ul>
                    <li>Competitor:
                        <%-- <input id="titles" />--%>
                        <select id="CompProducts" class="km-text">
                        </select></li>
                    <li runat="server">Series:
                        <select id="iLevel" class="km-text">
                        </select>
                    </li>
                    <li runat="server">
                        <label for="depth">
                            Depth:</label>
                        <select id="depth">
                        </select>
                    </li>
                </ul>
 <script type="text/javascript">
        var Container = '';
        var returnVal = '';
        var myArray2 = new Array();
        var myArray = new Array();
        var myArray3 = new Array();

        function GetAllUserInfo() {
            var Surl = "LPService.asmx/ListCompetitorProducts";
            $.ajax({
                url: Surl,
                type: 'POST',           
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    Container = [{ text: "--Select--"}];
                    myArray.push(Container[0]);

                    for (i = 0; i <= returnVal.length - 1; ) {
                        Container = [{ text: "" + returnVal[i], value: "" + returnVal[i]}];
                        myArray.push(Container[0]);
                        i = i + 1;
                    }
                    Init();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
        }
   
        function Init() {
            
           $("#CompProducts").kendoDropDownList({
                dataTextField: "text",
                dataValueField: "value",
                dataSource: myArray,
                change: onManfacturerChange
            });
        };
        var val = '';
        var id = '';

        function onManfacturerChange() {
            var va = this.value();           
            myArray2 = [];
            val = $("#CompProducts").val();           
            var dataString = "{'Manufacturer':'" + val + "'}";         
            var Surl = "LPService.asmx/ListCompetitorSeries";
            $.ajax({
                url: Surl,
                type: 'POST',
                data: dataString,
               contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    var arr = returnVal;                 
                    Container = [{ text: "--Select--"}];
                   myArray2.push(Container[0]);
                    for (i = 0; i <= arr.length - 1; i++) {
                        var Cont = [{ text: "" + arr[i], value: " " + arr[i]}];
                        myArray2.push(Cont[0]);                      
                    }
                    CompSeries();                 
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
   }
  
        function CompSeries() {  
             
           $("#iLevel").kendoDropDownList({
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: myArray2,
                    change: onChangeCompSeries
                });
        };     

        var val = '';
        var id = '';
        function onChangeCompSeries() {           
            myArray2 = [];
            val = $("#iLevel").val();
            var dataString = "{'SeriesType':'" + val + "'}";      
            var Surl = "LPService.asmx/ListDepth";
            $.ajax({
                url: Surl,
                type: 'POST',
                data: dataString,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    var arr = returnVal;               
                   Container = [{ text: "--Select--"}];
                    myArray2.push(Container[0]);
                    for (i = 0; i <= arr.length - 1; i++) {
                        var Cont = [{ text: "" + arr[i], value: " " + arr[i]}];
                        myArray2.push(Cont[0]);                     
                    }
                    Depth();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
        }
   
        function Depth() {         
            $("#depth").kendoDropDownList({ 
                dataTextField: "text",
                dataValueField: "value",
                dataSource: myArray2,
                change: onChangedepth
            });
        };
        var val1 = '';
        var id1 = '';
        function onChangedepth() {
            myArray3 = [];
            val1 = $("#depth").val() + '"';        
            var dataString = "{'DepthType':'" + val1 + "'}";      
            var Surl = "LPService.asmx/Depth";
            $.ajax({
                url: Surl,
                type: 'POST',
                data: dataString,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    var arr = returnVal;                
                    Container = [{ text: "--Select--"}];
                    myArray3.push(Container[0]);
                    for (i = 0; i <= arr.length - 1; i++) {
                        var Cont = [{ text: "" + arr[i], value: " " + arr[i]}];
                        myArray3.push(Cont[0]);                  
                    }
                    LpSeries();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
        }  
        function LpSeries() {         
            $("#dropdown").kendoDropDownList({
                dataTextField: "text",
                dataValueField: "value",
                dataSource: myArray3
            });
        };
    </script>


Every time when i select first dropdown, the second dropdown will bound upon the selected value in 1st dropdown.It was okey when i select 1st time but if i changed the 1st dropdown value again then the 2nd one will disappear.How to resolve this?   
Tirumalesh
Top achievements
Rank 1
 asked on 24 Apr 2012
2 answers
121 views
The following pages have broken links on them.
http://www.kendoui.com/documentation/ui-widgets/menu/overview.aspx
http://demos.kendoui.com/web/menu/api.html

The link that is broken is "Menu API demos"

Sara
Georgi Krustev
Telerik team
 answered on 24 Apr 2012
0 answers
155 views
Hi!

I am trying to define an initial value for an ajax datasource populated dropdownlist in an editor definition function for a grid column.
I have tried setting it via the text() function after initialization but it seems to get "changed" to index 0 as soon as the datasource is bound to the widget..
I also tried using a callback for the select() function, setting a value() as well as using the text() method both right after the initialization (which seems to get overwritten upon loading the data) and inside a "change" even handler for the transport attribute of the datasource; none of which helped.. please advise!

here a snippet of code i used:

"editor":
    function(container, options) {
      $('<input id="' + options.field + '" />')
          .appendTo(container)
          .kendoDropDownList({
                dataTextField: 'text',
                dataValueField: 'value',
 
                dataSource: {
                    change: function(e) {
                        var item = null;
                        $('#'+options.field).data('kendoDropDownList').ul.children().each(function(idx, elem) {
                            if($(elem).html() == options.model.rel_type) item = $(elem);
                        });
                        console.log($(item).html());
// does not select anything even tho console.log() proves that it is the correct element
                        $('#'+options.field).data('kendoDropDownList').select($(item));
                    },
                    transport: {
                        read:  {
                            url: '/relationdata/relation/relType',
                            dataType: 'json'
                        }
                    }
 
                }
          });
    }}

the grid loads fine but nothing is selected in turn.
GungFooMon
Top achievements
Rank 1
 asked on 24 Apr 2012
3 answers
529 views

Hi, We are using the following code but not able to populate the Grid. Our Json is in the form of string . the json structure is something like this. "d : [{"ID":"1","Name":"Umesh"}]"

$(document).ready(

 

function () {

 

$(

 

"#customergriddiv").kendoGrid
({
height: 400,
pageable:
true,
scrollable:
false,
sortable:
true,
columns: [{ field:
"ID", title: "ID" }, { field: "Name", title: "Name"}],
datasource: {
transport: {
read: {
type:
"POST",
url:
"GetJson.asmx/GetCustomers",
contentType:
'application/json; charset=utf-8',
dataType:
"json"
}

 

},
schema: {
data:

 

"d"
}
, pageSize: 10
}
});
 });

<

 

 

div id="customergriddiv"></div>

 

Luis
Top achievements
Rank 1
 answered on 24 Apr 2012
2 answers
303 views
Hi, I've been through the forums fairly thoroughly, and through the docs. What I want is to create an item in a listview where the text will word wrap.  I've tried just about every css property I can think of.  What I'm trying to achieve is image1, and what I get is image2.  Any ideas?  

It doesn't have to be in ListView I guess, but it was the only way I could find to get the rounded box.
Samuel PIckard
Top achievements
Rank 1
 answered on 24 Apr 2012
5 answers
422 views
Hi Kendo Team,
I have several issues with the TabStrip control -
1. How to select a dynamically added tab?
2. How to prevent the tab load after selecting it?
3. How to remove a tab by clicking on a control on that tab?
4.  After dynamically opening a tab and selecting existing tabs randomly the tab contents get mixed up in other tabs.
5. even though a second grid is initialized after the 2nd tab is selected, the grid content spills over the tab area.

I have attached a sample(I ran the sample from ~\kendoui\examples\web\Sample) where all these scenario can be seen.
We need this prototype to work to decide if we can use the KendoUI in our main project.

Thanks in advance for you help.
krishna surapaneni
Top achievements
Rank 2
 answered on 24 Apr 2012
3 answers
220 views
Hello,

I may know what are all tooltip format??

Thx
Gergo
Top achievements
Rank 1
 answered on 24 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?