Telerik Forums
Kendo UI for jQuery Forum
1 answer
733 views
I have a class: PeopleService that returns IQueryable list of People

public class PeopleService
    {
        List<Person> people = new List<Person>()
        {
            new Person(50, "Fred"),
            new Person(30, "John"),
            new Person(26, "Andrew"),
            new Person(24, "Xaier"),
            new Person(5, "Mark"),
            new Person(6, "Cameron"),
        };
 
        public IQueryable<Person> People
        {
            get { return people.AsQueryable<Person>(); }
        }
    }

This is the script that I am using:

<script>
    var myDataSource = {
        type: "odata",
        transport:
    {
        read: "http://localhost:56626/WcfDataService1.svc/People"
    }
    };
 
    $(document).ready(function () {
        $("#grid").kendoGrid({
            dataSource: myDataSource,
            height: 500,
            columns: ["Age", "Name"]
        });
    });
</script>

Here is the url view source of my read:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <title type="text">People</title>
  <id>http://localhost:56626/WcfDataService1.svc/People</id>
  <updated>2012-04-27T15:18:58Z</updated>
  <link rel="self" title="People" href="People" />
  <entry>
    <id>http://localhost:56626/WcfDataService1.svc/People('Fred')</id>
    <title type="text"></title>
    <updated>2012-04-27T15:18:58Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Person" href="People('Fred')" />
    <category term="WebApplication1.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Age m:type="Edm.Int32">50</d:Age>
        <d:Name>Fred</d:Name>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:56626/WcfDataService1.svc/People('John')</id>
    <title type="text"></title>
    <updated>2012-04-27T15:18:58Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Person" href="People('John')" />
    <category term="WebApplication1.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Age m:type="Edm.Int32">30</d:Age>
        <d:Name>John</d:Name>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:56626/WcfDataService1.svc/People('Andrew')</id>
    <title type="text"></title>
    <updated>2012-04-27T15:18:58Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Person" href="People('Andrew')" />
    <category term="WebApplication1.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Age m:type="Edm.Int32">26</d:Age>
        <d:Name>Andrew</d:Name>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:56626/WcfDataService1.svc/People('Xaier')</id>
    <title type="text"></title>
    <updated>2012-04-27T15:18:58Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Person" href="People('Xaier')" />
    <category term="WebApplication1.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Age m:type="Edm.Int32">24</d:Age>
        <d:Name>Xaier</d:Name>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:56626/WcfDataService1.svc/People('Mark')</id>
    <title type="text"></title>
    <updated>2012-04-27T15:18:58Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Person" href="People('Mark')" />
    <category term="WebApplication1.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Age m:type="Edm.Int32">5</d:Age>
        <d:Name>Mark</d:Name>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:56626/WcfDataService1.svc/People('Cameron')</id>
    <title type="text"></title>
    <updated>2012-04-27T15:18:58Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Person" href="People('Cameron')" />
    <category term="WebApplication1.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Age m:type="Edm.Int32">6</d:Age>
        <d:Name>Cameron</d:Name>
      </m:properties>
    </content>
  </entry>
 
</feed>

My grid is not returning data:  What am I missing?
Nikolay Rusev
Telerik team
 answered on 02 May 2012
5 answers
287 views
I would like to create a panel bar from a JSON object which is forged on basis of some nested array application data.
At some moment, I want to know the currents selection of the panel bar, and do something with corresponding selection of my original data.
However the .selected() method of the panelbar object returns the selected DOM element, and not a kind of index.
How to figure out what number of list element that actually is?

Suppose we have the panelbar as created in the panelbar basic demo, and we have selected the 'Q3 forecast' of the 'Sales forecast' of the Projects, then I would idealy want to know its relative index, something like 1,1,2. 

I studied the onSelect function of the panelbar API demo, but that does the tric the otherway arround.
Any suggestion, or do I perhaps misunderstand the concept of a panelbar  in the first place? 

Kamen Bundev
Telerik team
 answered on 02 May 2012
1 answer
256 views
Hi,

In our application, we need to have a custom handle responding to the swipe (left and right) touch events, I am aware with the lack of handling these events in the current released version of kendo mobile, so I need to replicate a similar behavior of these events.

Do you have any suggestions?

Amr 
Petyo
Telerik team
 answered on 02 May 2012
1 answer
141 views
Hi,

I am using Keno Mobile with PhoneGap in my application, I am replicating a list view similar to the one showed in the demo.
However, scrolling through the list items takes a considerable time to render the rest of the list items.

Can you have any suggestions about the source of this performance issue?

Thanks,
Amr
Petyo
Telerik team
 answered on 02 May 2012
6 answers
270 views
I've already seen too many forum post about problems, so I'm looking for a better intro and walkthrough for getting started that does NOT make any assumptions.

Yes, I understand that KendoUI is HTML5+jQuery+CSS but when building multi-targeted mobile apps for iOS, Android, etc must the HTML5 app be served from a web server?  Or will it be accessed from an app installed on the mobile device after packaging with PhoneGap? So that the HTML5 web pages are actually packaged into the app that is installed on each mobile phone device?

And if packaged with PhoneGap, where do you start: with a PhoneGap project?  Or with a Visual Studio project?  Especially if you want to build upon existing ASP.NET project dll's and ASP.NET MVC3 or MVC4 projects?

A complete walkthrough clarifying which development steps to complete in which development environment would prevent time wasted on trial and error.   Especially for the situation where I want to develop in Visual Studio with ASP.NET MVC 4 plus KendoUI on PC Windows, then eventually get to an iOS app for iPad and iPhone on Apple.
Dimo
Telerik team
 answered on 02 May 2012
1 answer
100 views
Is it possible to have a slider on graphs. We have a lot of data to graph and presently it just makes the columns or bar smaller trying to fit everything in the area allowed. I have attached an exemple to show what we would like to have.

Thanks in advance.

Pierre Sauvé

Hristo Germanov
Telerik team
 answered on 02 May 2012
1 answer
201 views
Hello,
data-init=" function " is executed when the page view is loaded the first time.

who load a function each time that is displayed ?

I try
app.navigate( url );

or
window.location = url;


but the page not call the function again.
Sasha
Top achievements
Rank 1
 answered on 02 May 2012
1 answer
4.8K+ views
Hello,
I have a grid being populated through a json data source. I can enable sorting on the grid by setting the sortable property to true. This enables sorting on all of my grid columns. Is there a way to enable sorting for particular fields only? So if I have a grid with 3 columns, I only want the users to sort by the first or second column.

Thanks in advance.
Tonny
Top achievements
Rank 1
 answered on 01 May 2012
0 answers
90 views
I've got a grid that is declaratively bound:
data-role="grid" data-bind="source = logEntries"

One of the columns is a Log Level column.  The data source field (Level) is an integer. I have that column declared with the template 
"template": "#= viewModel.getLogLevelAsName(Level) #"
that converts the integer into a human-friendly display name.  A human doesn't know the difference between log level "2" and log level "5" but certainly knows the difference between log level "Debug" and log level "Error."  This works out great because when the user sorts, they are sorting on the relative underlying value (the log level number) and not the display text.

That said, when I group by that column, the underlying data (log level number) shows to the user (see attached screenshot).  I'd like to run that number through the same
viewModel.getLogLevelAsName(...)
method.

Or maybe I'm missing something?  For example, some baked-in way to provide a lookup (display) value for items in a grid (besides using a manually-written template)?  Something like the ability to assign a column a "lookup data source" (data-display pair) so that the underlying data is always shown to the user based on the results of the lookup.
Chad
Top achievements
Rank 1
 asked on 01 May 2012
0 answers
69 views
Hi All:

Pretty sure it's a configuration issue.  When I load the WCF CRUD demo into Visual Studio, build, and run, I'm getting the following message when attempting to add a new record (grid is initially blank, btw):

Error: 'ProductID' is null or not an object.

Configuration uses SQL Server 2008 Express.  Could that be the problem, I wonder?

Dave
David Holland
Top achievements
Rank 1
 asked on 01 May 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?