Telerik Forums
Kendo UI for jQuery Forum
0 answers
176 views
Hi,
I have a WCF service which returns below JSON data & Below is my JQuery function to read JSON data, bind the same to grid.
Problem is: Unable to bind data to grid. Please suggest what changes required to my below function.

Note: my WCF is a RESTful service & multipleSiteBindingsEnabled="true"

[{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"E7B","Name":"Abraham, Bethany(426) ","Notifications":0,"Picture":null,"Resno":426,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"S26A","Name":"Banks, Rebecca M(301) ","Notifications":0,"Picture":null,"Resno":301,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"","Name":"Carr, William J(405) ","Notifications":0,"Picture":null,"Resno":405,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"W15A","Name":"Dickerson, Ann A(434) ","Notifications":0,"Picture":null,"Resno":434,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"E9A","Name":"Dorsey, Linda M(332) ","Notifications":0,"Picture":null,"Resno":332,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"E5B","Name":"Downey, Darlene J(407) ","Notifications":0,"Picture":null,"Resno":407,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"E11B","Name":"Easterling, Denise(443) ","Notifications":0,"Picture":null,"Resno":443,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"E9B","Name":"Eatherly, Harriet(445) ","Notifications":0,"Picture":null,"Resno":445,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"E10A","Name":"Edgar, Gloria J(430) ","Notifications":0,"Picture":null,"Resno":430,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4},{"Alerts":0,"Cono":"03","CurrentPageIndex":0,"Locations":"W20A","Name":"Evans, Kelly(461) ","Notifications":0,"Picture":null,"Resno":461,"Search":null,"Sort":null,"Status":0,"pageSize":0,"rcount":4}]


$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: {
            type: "odata",
            transport: {
                read: "http://localhost:3472/Service1.svc/json/getresident",
                dataType: "jsonp"
            },
            schema: {
                model: {
                    fields: {
                        Resno: { type: "number" },
                        Alerts: { type: "number" },
                        Notifications: { type: "number" },
                        Locations: { type: "string" },
                        Name: { type: "string" }
                    }
                }
            },
            pageSize: 10,
            serverPaging: true,
            serverFiltering: true,
            serverSorting: true
        },
        height: 250,
        filterable: true,
        sortable: true,
        pageable: true,
        columns: [{
            field: "Resno",
            title: "Res No",
            width: "100px"
        }, {
            field: "Name",
            title: "Res Name",
            width: "200px"
        }, {
            field: "Locations",
            title: "Location"
        }, {
            field: "Notifications",
            title: "Notifications",
            width: "200px"
        }, {
            field: "Alerts",
            title: "Alerts"
        }]
    });
});
Balu
Top achievements
Rank 1
 asked on 18 May 2012
5 answers
239 views

What i was wanting to happen is for my aspx page to load a number of user controls and then for the tabstrip control turn each loaded user control into a tabstrip item. I have written some code that will take the contents of a div and set it as the title then another div as the content. The idea was to have more control over the tab titles and for the tabs to be created dynamically. The amount of user controls and the content isnt known till the page is loaded

Basically the exact same code as below works with 2011 Q3 but not with the new update.

Javascript

$(document).ready(function () {
// var ParentID;
$("#tabstrip").kendoTabStrip({
});
var tabstrip = $("#tabstrip").kendoTabStrip().data("kendoTabStrip");
//for each DIV within tab content, move it to a new tab within the tad strip
$('#tabcontent').children().each(function (index) {
//Get HTML from DIV
var title = $(this).find('.tab_title').html();
$(this).find('.tab_title').css('display', 'none');
var innerHTML = $(this).html();
//Append to the TABStrip
tabstrip.append(
[{
text: title,
content: innerHTML
}]
);
//Remove original DIV
$(this).remove();
});
$('#tabstrip .k-tabstrip-items').children().each(function (index) {
var th = $.trim($(this).text());
$(this).html(th);
});
});


aspx page

<div id="tabstrip">
     </div>
     <div id="tabcontent">
         <asp:PlaceHolder ID="PHContent" runat="server"></asp:PlaceHolder>
     </div>

N.B. Placeholder is where the user controls is loaded into


User Control

<div class="editDefaultInfo" title="Tab Title">
<div class="tab_title">
<span class="glyph listicon"></span>
<p>Tab Title</p>
</div>
<h1>Tab Title</h1>
<div class="form_content">
Tab Content
</div><!--form_content-->
</div><!--Defaultinfo-->



Has something changed with the tabstrip control that would mean it no longer works?

Dr.YSG
Top achievements
Rank 2
 answered on 18 May 2012
1 answer
288 views
I looking to find a way to get the value of the textbox onkeyup.  The value has not changed for the input until the input loses focus.  I am trying to find a why where as the user types a total value can be updated instantly, and not have to wait until a focus change.  Is there any way to achieve this?

Thanks,
Joe
Joseph Roberts
Top achievements
Rank 1
 answered on 18 May 2012
2 answers
257 views
Hi there everyone,

I'm having an very strange problem with my project with TabStrips : it goes fast as hell on any desktop but it's really really slow on my tablet... 
Have you guys any advice about give it a little burst on performance?

Thanks a lot
supsym
Top achievements
Rank 1
 answered on 18 May 2012
3 answers
178 views
I purchased the web version straight after looking at the excellent demo's, assuming, wrongly, that like almost all software I have purchased in the past, DETAILED documentation for using PHP and Jquery would be provided.

I'm new to this, I need a good set of examples or documentation that will help me learn and, in time. become a skilled and fluent user of Kendo UI, I am really disappointed that this is not provided.

It's hard enough trawling through the web learning how to use PHP, but I DID expect a company of known high repute like Telerik to have excellent examples and documentation for me to learn, from a single source, the bulk of what I need to know, particularly after parting with hard earned $$$ for the Kendo UI web version.

After trawling through posts for three days, looking at examples given, I'm no closer to having a fairly simple working combo box with a drop down or a multu select list with a customers contact details on final selection, than i was before I purchased.

I'm starting to think I'll get a trip to Mars on a Virgin flight before I get something up and running with Kendo

It's also obvious from Posts and questions that even highly experienced programmers and web designers are also frustrated at poor documentation.

Before you start writing any more widgets, bells, whistles or flying pig switches, hows about writing some good, robust and easy to follow documentation with excellent examples of DataSource connection using PHP, it's not a lot to ask.
Georgi Tunev
Telerik team
 answered on 18 May 2012
9 answers
304 views
I'm using a KendoUI Grid on a page. It works fine on any desktop browser, but I have a problem on Mobile Safari (iPad or iPhone).

It seems that the grid's change event is being triggered when I'm scrolling the grid on the iPad (same on iPhone).

Is there a way to prevent that behavior?

Thanks.
Alexander Valchev
Telerik team
 answered on 18 May 2012
2 answers
572 views
I'm using build 2012.0 515 with jquery 1.7.1 and IE9.  I have a grid and want to configure inline editing with a web service.  The read transport works fine and my grid is populated with data.  If I click edit, change a value, then click save, the value in the grid is changed, but the update transport is not triggered.  So, if I refresh the page, the original values are back because they were not updated in the database.  There are no errors, but my web service for update is never called.  Should this trigger automatically as one of the built-in commands or do I need to do something to force it to trigger?

I've looked at the example for asmx services here:
https://github.com/telerik/kendo-examples-asp-net/blob/master/grid-web-service-crud/Default.aspx

I have added the HTTP GET and HTTP POST to my web.config file.  (My service is an intranet service, so I cannot use jsfiddle to demonstrate my issue). 

grid:
$("#grid").kendoGrid({
    dataSource: maxSource,
    toolbar: ["create"],
    columns: [
        { field: "MaximoItemNumber", title: "Maximo Item #" },
        "KVA",
        { field: "PrimaryVoltage", title: "Primary Voltage" },
        { field: "SecondaryVoltage", title: "Secondary Voltage" },
        { field: "OilType", title: "Oil Type" },
        "Phase",
        { command: ["edit", "destroy"], title: " "}
    ],
    editable: "inline"
});


datasource:
var maxSource = new kendo.data.DataSource({
    transport: {
        create: {
            url: webServiceBaseUrl + "createMaxItem",
            contentType: 'application/json; charset=utf-8',
            type: "POST",
            dataType: "json"
        },
        read: {
            url: webServiceBaseUrl + "getMaxItems",
            contentType: 'application/json; charset=utf-8',
            type: "POST",
            dataType: "json"
        },
        update: {
            url: webServiceBaseUrl + "updateMaxItem",
            contentType: 'application/json; charset=utf-8',
            type: "POST",
            dataType: "json"
        },
        destroy: {
            url: webServiceBaseUrl + "deleteMaxItem",
            contentType: 'application/json; charset=utf-8',
            type: "POST",
            dataType: "json"
        },
        parameterMap: function(data, operation) {
            if (operation != "read") {
                return JSON.stringify( { stuff: data.models } );
            }
        }
    },
    schema: {
            data: "d",
            id: "id",
            fields: {
                id: { editable: false, nullable: true },
                MaximoItemNumber: { validation: { required: true} },
                KVA: { type: "number" },
                PrimaryVoltage: { type: "string" },
                SecondaryVoltage: { type: "string" },
                OilType: { type: "string" },
                Phase: { type: "number" },
                DateAdded: { type: "datetime" },
                AddedBy: { type: "string" }
        }
    }
});
Cyndie
Top achievements
Rank 1
 answered on 18 May 2012
1 answer
448 views
When dynamically creating a 2nd modal window, the 1st modal window loses it's overlay, even though the 2nd modal window has not been opened yet. 

Here's a jsfiddle to show you what I mean:

http://jsfiddle.net/kukabuka/49AXA/

After you close the windows and open them again, it will work correctly because they are already created.  So reset the fiddle to reproduce.

I know I can work around this issue by not creating the 2nd window until just before I want to open it.  But I don't think it should behave like this.  Until you open the 2nd window, it shouldn't mess with the overlay of the 1st window.  I've got a situation where I'm dynamically creating windows displaying ajax gets, and it's more convenient to setup the window, and open it when I'm ready.

Using the latest 2012.1.515 released today, but I had the same issue with 2012.1.322.
Alex Gyoshev
Telerik team
 answered on 18 May 2012
1 answer
131 views
I would like to enable toggle functionality in the grid selection. So it the state is in selection state, I would like to perform one action. If it is toggled off, I would like another action to be performed. Is there a way to determine this? It would be great to see this property in the grid change (e) handler.
Alexander Valchev
Telerik team
 answered on 18 May 2012
4 answers
245 views
Hi 

I am starting with Kendo UI. I have an exisiting OData Service at http://enservice.indiamvp.net/EventNetworkingService.svc/Cities that is based on Odata v3. 

I am trying to display the cityname in a Mobile ListView. I have set up my datasource as follows:
var speakerData = new kendo.data.DataSource(
                {
                    type: "odata",
                    transport: {
                        read: {
                            // the remote service url
                            url: "http://enservice.indiamvp.net/EventNetworkingService.svc/Cities",
                            dataType: "jsonp",
                            data: {
                                Accept: "application/json"
                            }
                        }
                    },
                    serverfiltering: false,
                    serverPaging: true,
                    pageSize: 10,
                    batch: false,
                    schema: {
                    data: "d",
                        model: {
                            id: "CityID",
                            fields: {
                                CityID: { type: "number" },
                                CityName: { type: "string" }
                            }
                        }


                    }
                }
                );

To initialise the ListView I am using the following:

                $("#speakersView").kendoMobileListView(
                {
                    template: "<strong>${speakerData.CityName}</strong><br/>",
                    dataSource: speakerData.read()
                }
                );

Both the functions are in <head> element and not in the $document.ready function. I am using data-init on the view. Checking from Chrome Dev Tools, I can see that the JSON data is downloaded. 
However, nothing gets displayed on the ListView. Stepping through the JS i see that there is a exception getting generated: "speakerData is not defined" pointing to the fact the maybe the DataSource is not initialised properly.

Can someone recommend on what I could be doing incorrectly?

Thanks
Abhishek
Abhishek
Top achievements
Rank 1
 answered on 18 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
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?