Telerik Forums
Kendo UI for jQuery Forum
2 answers
514 views
in Default.aspx

<script type="text/javascript">
        var dataSource = new kendo.data.DataSource(
            {
                transport: {
                    read: {
                        contentType: "application/json; charset=utf-8",
                        type: "POST",
                        dataType: "json",
                        url: "http://localhost:1249/KendoUI2nd/WebService.asmx/LoadData"                        
                    }
                },
                pageSize: 10,
                schema: {
                    model: {
                        fields: {
                            Pkid_Emp: { type: "number" },
                            fkid_Dept: { type: "string" },
                            txt_Name: { type: "string" },
                            txt_Address: { type: "string" },
                            txt_Phone: { type: "string" },
                            txt_Salary: { type: "string" }
                        }
                    }
                }
            });
        alert(dataSource);

        $(document).ready(function () {
            $("#myGrid").kendoGrid({
                dataSource: dataSource,
                height: 250,
                columns: [
                 { field: "Pkid_Emp", title: "Pkid_Emp" },
                 { field: "fkid_Dept", title: "fkid_Dept" },
                 { field: "txt_Name", title: "txt_Name" },
                 { field: "txt_Address", title: "txt_Address" },
                 { field: "txt_Phone", title: "txt_Phone" },
                 { field: "txt_Salary", title: "txt_Salary" }
                        ]
            });
        });
    </script>

 <div>
            <div id="myGrid">
            </div>
        </div>


in Webservice.cs

[WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public string LoadData()
    {
        MyDataClassesDataContext MyDB = new MyDataClassesDataContext();

        var sharedDataSource1 = from x in MyDB.Emps
                                  select x;

        var serializer = new JavaScriptSerializer();

        return serializer.Serialize(sharedDataSource1);
    }



when is called webservice i get JSON Data . still my grid is empty . Please Help me ...






Thanks i read ur example n i implement read() into my project
but it showing me
System.NotSupportedException: Cannot serialize interface System.Collections.Generic.IEnumerable`1[[EmployeeClass, App_Code.7o30vskr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
   at System.Xml.Serialization.TypeDesc.CheckSupported()
   at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
   at System.Xml.Serialization.ModelScope.GetTypeModel(Type type, Boolean directReference)
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
   at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)
   at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos)
   at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos)
   at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
   at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

I Dont Know why ???? 
Please Help Me ... 
Rahul
Top achievements
Rank 1
 answered on 02 Apr 2012
1 answer
80 views
Hi,

I have a grid in which one of the column is of type "number". But when i filter on that column, i can see that it compares the value only when the number has two zeros after a decimal point. Like, if for 260, i select "Is equal to" and enter 260, it does not filter that row. But if i have a value say, 150.00 than in that case, "Is equal to" works. I don't want decimal points. How can i resolve that?

Regards,
Khushali
Alexander Valchev
Telerik team
 answered on 02 Apr 2012
1 answer
603 views
Hi,

I'm currently working with a Dropdownlist and I'd like to access the change event via MVVM and fire an AJAX call whenever the value of the Dropdown changes.

Currently
data-bind="event: { change: changeEvent }"

does not work and says the binding is unsupported by the dropdown list. I've got changeEvent setup correctly in my MVVM. Do I need to setup a custom handler for this? In Knockout I could achieve the following result by using a computed observable, or adding a listener on the dropdown value observable.

Any suggestions on the Kendo way of achieving my goal?
Rosen
Telerik team
 answered on 02 Apr 2012
1 answer
129 views
Just wondeting if Kendo UI will eventually create styles similar to the Web Forms controls? 

For example it would be great if you had the Windows 7 themes and/or Vista themes.  Trying to migrate from the Telerik server controls to Kendo.

Thanks,

Mike
Iliana Dyankova
Telerik team
 answered on 02 Apr 2012
1 answer
281 views
Hi,
is it possible for me to change the transition duration for the Radial Gauge widget?
At the moment it looks for me that the default duration is hard coded to 1 sec...

Regards
Alex
Alex Gyoshev
Telerik team
 answered on 02 Apr 2012
2 answers
101 views
Please view attached screenshot.
When I run the demo on my iphone app. Many parts of the menu could not seen on the screen. Why?

Device: iPhone 4
OS Version: 5.0.1(9A405)
Brandon
Top achievements
Rank 1
 answered on 02 Apr 2012
7 answers
1.0K+ views
Hi,

I've been playing with Kendo UI because and I found the following issues:

1. If I go to, for example, page 5 but I make a filter on Grid that returns only 1 page, the grid doesn't show me page 1... I have to click page 1 in order to show me the results... You can try it: http://demos.kendoui.com/web/grid/remote-data.html , then go to page 5, then filter Order date equals to 10/28/1996

2. The second issue is related to the first, because as you can see when filtering Order date equals to 10/28/1996 the Grid returns a row with Order date = 10/27/1996 

Greetings
Khushali
Top achievements
Rank 1
 answered on 02 Apr 2012
1 answer
174 views
I tried to stack Project 1 and Project 2 and put the total in line graph. however, project 1 and 2 are not stacking up.

Any idea what is the problem?

var
data = [{"TimeSeries":"2011-Jan","Project2":"225.13","Project1":"311.17","Total":"268.15"},{"TimeSeries":"2011-Feb","Project2":"235.57","Project1":"321.29","Total":"278.43"},{"TimeSeries":"2011-Mar","Project2":"245.38","Project1":"340.67","Total":"293.03"},{"TimeSeries":"2011-Apr","Project2":"232.6","Project1":"320.38","Total":"276.49"}];

$(document).ready(function() {
$("#chart").kendoChart({
theme: "silver",
title: {
text: "Total records processed"
},
legend: {
position: "bottom"
},
dataSource: {
data: data,
},
transitions: false,
series: [{
type: "column",
field: "Project1", stack:true },{
type: "column",
field: "Project2", stack:true },{
type: "line",
field: "Total" }
],
categoryAxis: {
field: "TimeSeries"
}
});
});
Ahmed
Top achievements
Rank 1
 answered on 02 Apr 2012
1 answer
99 views
Hi,
when Firefox autofills the password input field of my login form, the value is not updated in bound viewModel property.
Thx for support, Mat
Atanas Korchev
Telerik team
 answered on 02 Apr 2012
1 answer
117 views
Hi
I am evaluating the KendoUI product and have hit the following issue when putting multiple <select> inside an <li>:

I am having to put extra select inputs (<select id="" />) in just to make them render at all,
without them it looks like alternate selects are being ignored, (eg only day and year are displayed)
Latest KendoUI release, Jquery 1.7.1, both firefox (11.0) and chrome (17.0.963.83)

Thanks

James
<
form id="">          <ul> <li><label>Date of birth</label><select id="dobDay" data-bind="source: days, value: day" /> <select id="" /> <select id="dobMonth" data-bind="source: months, value: month" /> <select id="" /> <select id="dobYear" data-bind="source: years, value: year" /> <select id="" /> </li> <li><label for="agent">Agent Name</label></><input id="agent" /></li> </ul> </form>
$("#dobDay").kendoDropDownList();
$("#dobMonth").kendoDropDownList();
$("#dobYear").kendoDropDownList();

var viewModel = kendo.observable({
	days: ["1""2""3""4"],
	day: "",
	months: ["January""Febuary""March""April"],
	month: "",
	years: ["1900""1901""1902""1903"],
	year:""
});
kendo.bind($("form"), viewModel);
PS: In firefox this editor doesn't wrap text when it gets to the edge of the text area, it just carries on and you cant see the text.....
Dimo
Telerik team
 answered on 02 Apr 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
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
SPA
Filter
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?