Telerik Forums
Kendo UI for jQuery Forum
4 answers
392 views
Hi,

I would like send the UID from a new entry with the other data to the server. (I use the beta from KendoUI)

schema:
schema: {
                               model: {
                                   id: "ID",
                                   fields: {
                                       Email: { validation: { required: true}},
                                       datauid: { editable: false}
                                   }
                               },
                               total: function(result) {
                                   // Count records
                                   //alert(result.length);
                                   GridCount_dataBound(result);
                               }
                           }

columns:
columns: [
                            { field: "Email", title: "<?php echo $this->translate("Email"); ?>"},
                            { field: "datauid", title: "<?php echo $this->translate("UID"); ?>",  template: "<input type='hidden' name='datauid' value='#= uid #'>"},
                            { command: [
                                        {name: "edit"},
                                        {name: "destroy"}
                                       ], width: "200px"
                            }
                        ],

I can see the uid in the input field but the model is emty:
models  [{"ID":"","Email":"cyxcyxcxy","datauid":""}]

Could you help me?

Best regards
Damir
Damir
Top achievements
Rank 1
 answered on 23 Mar 2012
2 answers
139 views
Hi,

I am starting a new application and I intend to use KendoUI Mobile. When I show an external View like this: 
    <a href="http://kendoui.com/" data-rel="external">Visit KendoUI</a>
    or something like that:
 <div data-role="view">Foo <a href="bar.html" data-role="button">Go to Bar</a></div>


Is there any Postback ??? I Suppose the view is loaded with Ajax without any PostBack, Am I correct ???

Thanks in advance
mvbaffa
Top achievements
Rank 1
 answered on 23 Mar 2012
0 answers
100 views
I'm working on an application that needs to have one element selected in a hierarchy grid. To explain further, there's a top level grid of items, and each item in that list has a sub-grid. I want to make it so that when you select any element in the top level grid or any of the subgrids, it clears the selections out for all the others. Is there an easy way to do this?
David
Top achievements
Rank 1
 asked on 23 Mar 2012
0 answers
145 views
As a software engineer, just now i am learning the Kendo UI, to implement in our future project. 

If i call a page method from ajax ($.ajax), and create a data source, and supply that datasource to the kendo autocomplete, then it works fine.

But I am trying to connect to an Asp Net page method from within a datasource which is inside a kendo autocomplete. Because I am planning to extensively follow this approach in Grid paging, filtering and sorting etc.

But the page method is never called at all. Herewith I show the code.

Client Side:

var _rootUrl = '<%=string.Format("{0}{1}/", Request.Url.GetLeftPart(UriPartial.Authority), HttpRuntime.AppDomainAppVirtualPath)%>';
$(document).ready(function()
        {
            $("#TxtName").kendoAutoComplete(
            {
                minLength: 1,
                dataTextField: "Name",
                dataSource: 
                {
                    transport: 
                    {
                        read: 
                        {
                            type: "POST",
                            url: _rootUrl + "AutoComplete/Default7.aspx/GetEmployeesNames",
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            data: "{}"
                        }
                    },
                    schema: 
                    {
                        data: function(data) 
                        {
                            return JSON.parse(data.d);
                        }
                    }
                }
            });
        });

Server Side Asp Net Page Method:

    [System.Web.Services.WebMethod()]
    [System.Web.Script.Services.ScriptMethod()]
    public static string GetEmployeesNames()
    {
        string StrConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringEmployeesNormalized2"].ConnectionString;
        SqlConnection SqlConnection1 = new SqlConnection(StrConnectionString);
        SqlCommand SqlCommand1 = new SqlCommand("SELECT Id, Name FROM dbo.Employees ", SqlConnection1);

        DataTable DataTable1 = new DataTable();
        SqlDataAdapter SqlDataAdapter1 = new SqlDataAdapter(SqlCommand1);
        SqlDataAdapter1.Fill(DataTable1);

        List<Employee> List1 = new List<Employee>();
        foreach (DataRow DataRow1 in DataTable1.Rows)
        {
            List1.Add(new Employee(Convert.ToInt32(DataRow1["Id"]), Convert.ToString(DataRow1["Name"])));
        }

        string JsonText = (new JavaScriptSerializer()).Serialize(List1);

        HttpContext.Current.Response.ContentType = "application/json";
        return JsonText;
    }

Could you please help me?
Guna
Top achievements
Rank 1
 asked on 23 Mar 2012
1 answer
203 views
Hi.  I have 3 cascading dropdowns in my form, similar to the beta example.  Sometimes when I load my form, it may already be filled out.  Meaning I need to populate the menu with the proper items and then select the correct one. 

My question is, I call the .read method to populate the datasource, but then how do I select the item.  I tried doing it in the datasource changed event but that did not work.  If I set the selection before refreshing the datasource, then it gets wiped out.  I'm not sure why it's not doing it in the changed event, seems like that should.
Georgi Krustev
Telerik team
 answered on 23 Mar 2012
1 answer
107 views
I'm trying to get my window to open in the center of the screen.
I'm here totally confuse with the code.

It is working fine in brwosers like FF & Chrome.
here is the code m using:

$(document).ready(function() {
                    var window = $("#window"),
                    undo = $("#undo")
                            .bind("click", function() {
                                window.data("kendoWindow").open();
                                undo.show();
                            });
                    
                    var onClose = function() {
                    undo.show();
                    }
                    
                    if (!window.data("kendoWindow")) {
                    window.kendoWindow({
                        width: "500px",
height: "330px",
                        modal: true,
                        title: "RFX Details",
visible: false,
                        content: "popupContent.html",
                        actions: ["Refresh", "Maximize", "Close"],
close: onClose
                    }).data("kendoWidnow").center().open();
                    


}
$("#undo").click(function(){
var window = $("#window").data("kendoWindow");
window.center();
window.open();
});
                    });
Dimo
Telerik team
 answered on 23 Mar 2012
3 answers
738 views
What IDE is best to use to develop html5 websites and/or apps?

thanks
Basem
Top achievements
Rank 1
 answered on 23 Mar 2012
1 answer
115 views
The website specifically says that KendoUI is included in Premium collection:

Already a Telerik customer? Kendo UI is included in Telerik Premium and Ultimate Collections

Yet when I tried to upgrade to Q1 2012 after using Q3 2011 I only have access to the "Web" part of Kendo.  If this is a change in pricing/bundling then there seem to have been little or no notice of this, which has removed parts of the Kendo framework which I previously had access.

I have been testing the Dataviz heavily recently as a part of new production page and have been waiting for a fix for a Firefox bug (which I found) and I'll be very dissapointed if I no longer have access to that fix without any notice,

Thanks.

Atanas Korchev
Telerik team
 answered on 23 Mar 2012
4 answers
103 views
Hi,

I have a Web Mobile application, developed some time ago,aAt that time there was no Kendo UI Mobile, and I would like to use KendoUI Web Widgets in the pages of this application.

I have tested the Web Widgets samples in my Galaxy Tablet and they work very well.

Is there any known issue that could make improper the use of Web Widgets in Mobile Applications.

Thanks in advance
mvbaffa
Top achievements
Rank 1
 answered on 23 Mar 2012
5 answers
737 views
Hi, hopefully a quick solution here.

I have a grid showing data from a remote data source, code is below inc JSON sample. All works fine apart from filtering on the date column, which then gives a JS error "no method getTime()". I believe this is because the dates returned in the JSON datasource are actually in string format rather than a date object.

If this is the case, or if there is something else I'm missing can someone please help out?

thanks.


//  models
var ftModel_EventLog = kendo.data.Model.define({
        id: "EventLog_ID",
        fields: {
            EventLog_ID: { type: "number" },
            EventLog_EntryDate: { type: "date" },
            EventLog_Message: { type: "string" }
        }
    });
 
//  dataSource
    var ftDataSource_EventLog = new kendo.data.DataSource({
        transport: {
            read: {
                url: "Services/Grid.aspx",
                data: {
                    src: "eventlog"
                },
                dataType: "json"
            }
        },
        schema: {
            data: function (data) {
                return eval(data.data);
            },
            model: ftModel_EventLog
        }
    });
 
//  start of functions
 
function ftLoadContent_EventLog() {
    $(".grid").kendoGrid({
        dataSource: ftDataSource_EventLog,
        filterable: true,
        height: 380,
        sortable: true,
        columns: [
            { field: "EventLog_Message", title: "Message" },
            { field: "EventLog_EntryDate", title: "Entry Date" }
        ]
    });
}

A sample of the JSON data is:

{"data":[{"EventLog_ID":"1","EventLog_Message":"This is an event.","EventLog_EntryDate":"01/02/2012 17:34:22"},{"EventLog_ID":"2","EventLog_Message":"This is another event.","EventLog_EntryDate":"01/02/2012 17:34:45"}]}


Andre
Top achievements
Rank 1
 answered on 23 Mar 2012
Narrow your results
Selected tags
Tags
+138 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?