Telerik Forums
Kendo UI for jQuery Forum
9 answers
2.4K+ views
I have a working asmx web service, which returns JSON data, feeding a grid via a datasource:-
var dataSource = new kendo.data.DataSource({
       transport: {
           read: {
               type: "GET",
               url: "http://localhost:51465/WidgetService.asmx/GetPatients",
               contentType: 'application/json',
               datatype: "json"
           }
 
       },
        
       serverPaging:false,
        
       schema: {
 
           data: "d"
 
       }
       , pageSize: 10
   });

This works fine.  However , when I try to pass a parameter to the asmx service (to enable server side filtering), like this:-
var dataSource = new kendo.data.DataSource({
       transport: {
           read: {
               type: "GET",
               url: "http://localhost:51465/WidgetService.asmx/GetPatientsFiltered",
               contentType: 'application/json',
               datatype: "json",
 
               data: { srchFilter: "blue" }
           }
       },
     
       serverPaging:false,
        
       schema: {
           data: "d"
       }
       , pageSize: 10
   });

I get an Invalid JSON primitive error.  Using fiddler, I can see that the call to the web service is http://localhost:51465/WidgetService.asmx/GetPatientsFiltered?srchFilter=blue&take=10&skip=0&page=1&pageSize=10
, but as it's a JSON call, it isn't encoded correctly. How can I correctly format the call?
Also, even though server side paging is set to false, it's passing the paging parameters - the only way to stop this is to remove the pageSize setting, which then removes client-side paging on the grid.  How can I fix this.

It would be really helpful to have a lot fuller documentation on the datasource, including all the options and parameters that can be used, and the sort of services it is expecting (i.e. parameter names / formatting etc..). Currently I feel as if I'm stumbling around in the dark (and most examples on the web either relate specifically to jquery, or asp.net AJAX).

Thanks
Long
Top achievements
Rank 1
 answered on 14 Apr 2012
0 answers
105 views
Hi,
How I can create i validator message with tooltip ?

Thanks
Vitantonio
Top achievements
Rank 1
 asked on 14 Apr 2012
5 answers
759 views
I'm using jquery mobile with some controls of kendo ui (either kendo mobile isn't out yet).

Jquery Mobile use AJAX to load the content of the next page and replaces the content of the div with the attribute data-role="page". 
This is fine and works great, but with the time the page gets slower and slower. the reason for this is, that kendo ui creates elements in the body of the document, and those elements are never removed... so the page dom increases with every page load... 

Is there a reason to destroy existing controls so that they remove the generated content in the body? Or can I define in which element kendo ui will generate the hidden divs?

Thank you 
Micha
Chad
Top achievements
Rank 1
 answered on 14 Apr 2012
18 answers
728 views
When I try to scroll an opened dropdownlist on the iPad, it selects the item that was touched in the list and then closes. So to select the actual item that I'm looking for I have to open and scroll n number of times until I reach such item.  Is there a way to differentiate the touch between a drag and a click.  I was thinking about trying to make it cancel the close when the drag event happens.
Swetha
Top achievements
Rank 1
 answered on 13 Apr 2012
3 answers
265 views
How can we add data to the HTML headers sent by the data source?
Is there a function or property that will do this?

Something like this would be a simple fix as JQuery 1.5.* supports adding
a "headers" map to add any custom headers you want.

                        transport: {
                            read: "http://localhost/WebAPITest/api/Transactions",
                            datatype: "json",
                            headers: { Authorization: "user/password" }
                        },

Thanks
Gary
Top achievements
Rank 1
 answered on 13 Apr 2012
1 answer
126 views
Hello,

Can you provide several examples for MVVM with TreeView and a JSON DataSource ?

Best Regards,
Guillaume
Kyle
Top achievements
Rank 1
 answered on 13 Apr 2012
0 answers
77 views
Hello

Items CAN USE Kendo in functions

sample :

this.ComboBox = this.kendoComboBox();
this.ComboBox.setName("COMBOID");
this.ComboBox.setWidth(550);
this.ComboBox.setHeight(33);
this.ComboBox.setIndex(0);
this.ComboBox.setdataTextField("Name");
this.ComboBox.setdataValueField("ID");
this.ComboBox.setFilter("Contains");
this.ComboBox.setDataType("odata");
this.ComboBox.setserverFiltering("true");
this.ComboBox.setServerPaging("true");
this.ComboBox.setPageSize("20");

would generate the following results will :

$("#comboBox").kendoComboBox({       
index: 0,       
dataTextField: "Name",       
dataValueField: "Id",       
filter: "contains",       
dataSource: {           
type: "odata",           
serverFiltering: true,           
serverPaging: true,           
pageSize: 20,           
transport: {               
read: "http://odata.netflix.com/Catalog/Titles"            }        }    });


thanks.

Taha
Top achievements
Rank 1
 asked on 13 Apr 2012
0 answers
121 views
What is the easiest way to dynamically insert html content into a kendo PanelBar?  For example I would like to place checkboxes next to item titles.  Is there a flag like 'encoded' for the Treeview? 
Mike
Top achievements
Rank 1
 asked on 13 Apr 2012
0 answers
100 views
I have a suggestion that would simplify the way to retrieve specific cell values from data items when selecting multiple rows from a grid.

Right now, the only clean way to get cell values from selected rows would be to get the selected elements with grid.select(), then go through all the rows and then build your own array with the desired cell values.

Why not implement something like this:

var usernames_and_emails = grid.dataItems(grid.select(), ["username", "email"]);

The usernames_and_emails variable would contain all the selected rows as javascript objects, each object having the username and email properties.
If the second parameter is omitted for the .dataItems() method, then it should get all the columns for the grid.

Also, it would be nice to have a method to get a single column instead of an array of objects

for example

var user_ids = grid.dataItemsColumn(grid.select(), "id");

user_ids would be an array with ids.

I think this way it would be a bit easier to fetch data when working with multiple rows.

---------------------
Long story short

dataItems (tr_array  [, fields_array])
returns an array of data items for the specified tr elements in the "tr_array"
if the "fields_array" is specified, only the fields specified in the array are returned

dataItemsColumn(tr_array, field_name);
returns an array of cell values (indicated by "field_name") for the specified tr elements in the "tr_array"

I guess this would eliminate the use of writing some repetitive code or implementing a custom function.

Gabriel.
Gabriel
Top achievements
Rank 1
 asked on 13 Apr 2012
0 answers
79 views
Hi,

I am trying to set the width of dropdonw in relative term (i:e in %)  the dropdown  appearss find but when i click on the drop down list
I am able to see the data also . but the width of the list is not matching with the width of dropdown list.  when i assign the width in px it works fine . what could be causing this issue.

AD

Anil
Top achievements
Rank 1
 asked on 13 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?