Telerik Forums
Kendo UI for jQuery Forum
1 answer
223 views
Hi,

I need to use my current ASP Net forms authentication with Kendo UI Mobile. Any ideas on how to make it work? I can't find any posts or tutorials around this.
Chris
Top achievements
Rank 2
 answered on 17 Nov 2012
2 answers
152 views
the KENDO UI  version 2012.2.913  work in the latest version ASP .NET MVC 4 with Visual Studio 2012 pro?

Thanks.
Dan
Top achievements
Rank 1
 answered on 17 Nov 2012
1 answer
195 views
Hii, i have some problem with updating data on data grid.
If in a first time adding data and than that new data is updated, that data not update but adding new data,
If page is reloaded or in a first time will be update data, update process is working.

this my script :
$(document).ready(function() {
    dataSource = new kendo.data.DataSource({
           transport: {
              read: {url:"<?=base_url()?>/bank"},
              create: {url:"<?=base_url()?>/bank/create",type:"POST"},
              update: {url:"<?=base_url()?>/bank/update", type:"POST"},
              destroy: {url:"<?=base_url()?>/bank/destroy",type:"POST"},
            },
            batch: true, pageSize: 25,
            schema: {
                model: {
                    id: "id_bank",
                    fields: {
                        nama_bank: { type: "string" },
                    }
                }
            }
    });
    //kendo grid
    $("#grid_bank").kendoGrid({
        dataSource: dataSource, editable:  "popup", height: 450,
        filterable: true, sortable: true, pageable: true,
        toolbar: ["create"],
        columns: [
            { field: "nama_bank",title: "Nama", filterable: true },
            { command: ["edit", "destroy"], title: " ", width: "160px" }
        ]
    });
});

main problem : update process can't be working again after create process is execute, and always execute create process when it will do updating data.

Thank
Deepak kumar
Top achievements
Rank 1
 answered on 17 Nov 2012
3 answers
601 views
Hi, i can not paging the grid result, the data is ok, but the paging not work, please help my:
This is my code page aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication3._default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Griglia</title>   
        <script type="text/javascript" src="Scripts/KendoUi/jquery.min.js"></script>
    <script src="Scripts/KendoUi/kendo.all.min.js" type="text/javascript"></script>
        <link href="Styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
        <link href="Styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
         <style>
                #clientsDb {
                    width: 692px;
                    height: 393px;
                    margin: 30px auto;
                    padding: 51px 4px 0 4px;
                    background: url('../Images/clientsDb.png') no-repeat 0 0;
                }
            </style>
            
</head>
<body>
    <form id="form1" runat="server">
    <div id="example" >
            
             <div id="clientsDb">

                <div id="grid"></div>

            </div>
    </div>
        <script type="text/javascript">
           
            $(function () {
                $("#grid").kendoGrid({                    
                    dataSource: {                       
                        schema: {
                            data: "Comuni", total: "TotalCount", // ASMX services return JSON in the following format { "d": <result> }. Specify how to get the result.                           
                            model: { // define the model of the data source. Required for validation and property types.
                                id: "CapComId",
                                fields: {
                                    CapComId: { editable: false, nullable: true },
                                    CapComCod: { validation: { required: true} },
                                     CapComCom: { validation: { required: true} }
                                }
                            }
                         },                                          
                        
                        transport: {
                            
                            read: {
                                url: "default.aspx/ListaComuni", //specify the URL which data should return the records. This is the Read method of the Products.asmx service.
                                contentType: "application/json; charset=utf-8", // tells the web service to serialize JSON
                                type: "POST" //use HTTP POST request as the default GET is not allowed for ASMX
                            },
                            parameterMap: function (data, operation) {
                                if (operation != "read") {
                                    // web service method parameters need to be send as JSON. The Create, Update and Destroy methods have a "products" parameter.
                                    return JSON.stringify({ comuni: data.models})
                                }
                            }
                        },
                         serverPaging: true,                           
                         serverFiltering: true,
                         pageSize:6
                    },
                    height: 300,
                    groupable: true,
                    scrollable: true,
                    sortable: true,
                    pageable: true,
                    columns: [{
                        field: "CapComCod",
                        width: 90,
                        title: "Cap"
                    }, {
                        field: "CapComCom",
                        title: "Comune"
                    }
                        ]
                });
            });

    </script>
    </form>
</body>
</html>
and page code c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Services;
 
namespace WebApplication3
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        [WebMethod]
        public static IEnumerable<Comuni> ListaComuni()
        {
            using (var northwind = new DataClasses1DataContext())
            {
                 
                var lista = northwind.CAPCOM.Where(row=> row.CapComId<100)
                    // Use a view model to avoid serializing internal Entity Framework properties as JSON
                    .Select(p => new Comuni()
                                     {
                                        CapComId = p.CapComId,
                                        CapComCod = p.CapComCod,
                                        CapComCom = p.CapComCom
                                     })
                    .ToList();
 
 
 
                return lista;
            }
        }
         
        public class Comuni
        {
            public int CapComId { get; set; }
            public string CapComCod { get; set; }
            public string CapComCom { get; set; }
            public int Total { get; set; }
        }
    }
}

The data is show ok , but the paging show 1 and not work..

I can not understand how I do, I help?
Thanks
Aurelio
Dan
Top achievements
Rank 1
 answered on 17 Nov 2012
0 answers
164 views
Hi,

I have a grid with 7 x AM / PM columns and need to split each two by the day of the week. I have seen the columns.headerAttributes object but how would it be possible to share a header (eg. Monday) between two columns (AM/PM).

I know I could make css classes to show the header how I like but how would I share the day of the week over two classes? "Mon" in one class and "day" in the other would surely cause problems.

Thanks
Matt
Matt
Top achievements
Rank 1
 asked on 17 Nov 2012
1 answer
181 views
I have a REST service that outputs the following json using GET:

[{"Active":true,"DisplayText":"Flyers","TemplateCategoryID":1},{"Active":true,"DisplayText":"Door Hangers","TemplateCategoryID":2},{"Active":true,"DisplayText":"Postcards","TemplateCategoryID":3},{"Active":true,"DisplayText":"Tri-Fold","TemplateCategoryID":4},{"Active":true,"DisplayText":"Facebook Graphics","TemplateCategoryID":5}]
My Combobox setup looks like this:

@(Html.Kendo().ComboBox()  
        .Name("templateCat") //The name of the combobox is mandatory. It specifies the "id" attribute of the widget.
        .DataTextField("DisplayText") //Specifies which property of the Product to be used by the combobox as a text.
        .DataValueField("TemplateCategoryID") //Specifies which property of the Product to be used by the combobox as a value.
        .Filter(FilterType.Contains)
    .DataSource(source =>
    {
     
        source.Read(read =>
        {
            read.Action("GetTemplateCategories", "Console"); //Set the Action and Controller name         
        });
    })
    .SelectedIndex(0) //Select first item.
)
My Controller:

public ActionResult GetTemplateCategories()
{
    string baseAddress = string.Format(ConfigurationManager.AppSettings["MarketingServiceAddress"] + "GetTemplateCategories");
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(baseAddress);
    request.Method = "GET";
    request.ContentType = "text/plain";
 
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    {
        int statusCode = (int)response.StatusCode;
        StreamReader reader = new StreamReader(response.GetResponseStream());
        string results = reader.ReadToEnd();
 
        
 
        return Json(results, JsonRequestBehavior.AllowGet);
    }
}
My combobox looks like it is binding to some sort of data, but all items in the list are 'undefined'.  What am I doing wrong?  I have verified that the controller is receiving the json string just fine from service.
Kevin
Top achievements
Rank 1
 answered on 16 Nov 2012
0 answers
116 views
I'm noticed that Grid doesn't full dispose of all it's components when resizing option is enabled and Grid.destroy() is called. I confirmed with chrome, and there are widget elements retained in heap related to draggable and some other components. 
Andrew
Top achievements
Rank 1
 asked on 16 Nov 2012
1 answer
183 views
I have a grid, that works fine, when page gets through address or postback.
But if I load the page with the grid, go somewhere to other page, then return to th grid page through "Back" button in the browser, then the grid will display, populates with data, but all the columns and schema are lost.
It display all the columns (when only 5 of then should be displayed), type in the schema is not applied (date fileds are displayed as /Date12345... format) and no tempate are aplied to the fields where these templates are defined.

Help me please, this ruins my site!
I've tried to read data again with dataSource "read" method - everything the same.
If I press "F5", then grid will display normally.

Here is the code:
    $(document).ready(function () {


        var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "Courses.aspx",
                        contentType: "application/json",
                        dataType: "json",
                        cache:false
                    }
                },
                schema: {
                    data: "List", 
                    total: "Total",
                    model: {
                        id: "ID",
                        fields: {
                             CourseVersionName: {
                                editable: false,
                                nullable: true
                             },
                             CourseName: {
                                editable: false,
                                nullable: true
                             },
                             CourseLanguage: {
                                editable: false,
                                nullable: true
                             },
                             Country: {
                                editable: false,
                                nullable: true
                             },
                             LastLoad: {
                                type: "Date",
                                editable: false,
                                nullable: true
                             },
                             QuestionsCount: {
                                editable: false,
                                nullable: true
                             },
                             ExpirationDate: {
                                type: "Date",
                                editable: false,
                                nullable: true
                             }
                        }
                    }
                },
                pageSize: 5,
                serverPaging: true 
            });


        $("#dataGrid").kendoGrid({
            dataSource: dataSource,
            columns: [
                { field: "CourseVersionName", title: "Course Version" },
                { field: "CourseName", title: "Course Name" },
                { field: "CourseLanguage", title: "Language" },
                { field: "Country", title: "Country" },
                { field: "LastLoad", title: "Course Loaded Date", sortable: true, template: '#=kendo.format("{0:dd.MM.yyyy}", LastLoad)#' },
                { field: "QuestionsCount", title: "Questions", template: '<a href="Questions.aspx?CourseID=${ ID }">Questions (${ QuestionsCount })</a>' },
                { field: "ExpirationDate", title: "Expiration Date", sortable: true, template: '#= ExpirationDate != null ? kendo.format("{0:dd.MM.yyyy}", ExpirationDate) : ""#' }
                ],
            autoBind : false,
            pageable: true
       });


       dataSource.read();
Jorge
Top achievements
Rank 1
 answered on 16 Nov 2012
1 answer
143 views
Hi,

         How to add a back button form the navigation bar in scroll view  based in your sample code?

Thanks
Iliana Dyankova
Telerik team
 answered on 16 Nov 2012
1 answer
134 views
I am trying to build a column chart with more than one series.  One of the series I want stacked, the other I don't want stacked.  Every way I try to do this, even if I say stack:false on the series that I don't want stacked, they get bundled in with the other series which are stacked.  I've also tried using the group name and that works if I want both series to be stacked, but it won't allow one to be stacked and the other columns to not be.

Any advice?

Iliana Dyankova
Telerik team
 answered on 16 Nov 2012
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?