Telerik Forums
Kendo UI for jQuery Forum
1 answer
158 views
Hi,
 i have written a code for taking json data from a php and putting to listview ,it works great in localhost ,
when i put the php file in a webserver and called in javascript it showing eeror and not getting data.


this method i have  used 
 var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                     
                       //url: "userchk.php",    //this works in localhost  
                       url: "http://example.com/web/userchk.php",  this is not working 
                       
                        dataType: "json",
                        data: { 
                            q: "javascript"
                        }
                    }
                },

first url data is geting in localhost and works great, second url is not working(but data showing  if we run the url in a browser)

it show Error

XMLHttpRequest cannot load http://example.com/web/userchk.php?q=javascript. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

waiting for a good response
Johan
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
95 views
Viewing on the iPad 3, only the main menu loads; there are no transitions, though when you click a button a 'loading' modal pops up.  Further, it breaks the page when attempting further clicks.  
Kamen Bundev
Telerik team
 answered on 08 May 2012
1 answer
344 views

I keep seeing the following messages in Chrome's F12 console:

  1. Resource interpreted as Image but transferred with MIME type application/octet-stream: "http://localhost:50659/webroot/Scripts/KendoUI/styles/BlueOpal/sprite.png".

  1. Resource interpreted as Image but transferred with MIME type application/octet-stream: "http://localhost:50659/webroot/Scripts/KendoUI/styles/textures/highlight.png".

It does not seems to effect anything. 

-George
Atanas Korchev
Telerik team
 answered on 08 May 2012
1 answer
119 views
Hi,

I was going to login and download the most recent release but can't seem to find the login link or button. Am I missing something?

Thanks,
Tony
Atanas Korchev
Telerik team
 answered on 08 May 2012
1 answer
145 views
I am hoping someone can shed some light on the proper method for handling batch updates on a grid when the backend data source is an XML based web service.

Here are the particulars:

I would like to use the built in update, create and delete properties of the datasource transport, at the same time, I need to manipulate the data being sent to the web service from json to xml (the reader is json, the writer is xml).   The caveat to this is I need to update the actual cell value being updated not a whole record (model) at a time.   The problem with doing this strictly in the datasource (as far as I can tell) is that I cannot get details about which column changed only that the record (model) was updated.

Is there a way without putting in handlers within the KendoGrid to identify which fields have changed during the parameterMap callback so I can output just those individual values that have changed in a batch mode?


Here is what I did, but I would like to avoid putting a handler in the grid (if possible):

I put an event handler off the save property of the KendoGrid to record a list of changed cells.   Then, on the ParameterMap of the data source, I go through the records and build the proper xml.  


Is this the right approach or is there a better way to do this all within the datasource?

Here is my KendoGrid definition:

$(this._renderTo).kendoGrid({
    dataSource: this.ItemsDS,
    sortable: true,
    pageable: true,
    navigatable: true,
    editable: true,
    save: $.proxy( this.onCellChanged, this ),
    columns: [
        { field: "Position.Name", title: "Position", width: 20 },
        { field: "Headcount.value", title: "Headcount", width: 15 },
        { field: "FTE.value", title: "FTE", width: 15 },
        { field: "EmployeeName.value", title: "EmployeeName", width: 50 },
        { field: "JobCode.value", title: "JobCode", width: 20 },
        { field: "JobTitle.value", title: "JobTitle", width: 100 }
    ]
});


Then, the onCellChanged:
onCellChanged: function (e) {
    var isDirty = false;
 
    var fieldName = e.container[0].firstChild.name;
    if (!fieldName)
        return;
 
    var newValue = e.values[fieldName];
    var oldValue = e.model[fieldName]
 
    if (newValue != oldValue) {
        var esResults = this.ItemsDS._pristine.EmployeeListResponse.Results;
        elemName = fieldName;
 
        // Create the record that will be sent back to TM1
        this._employeeUpdates.items.push({
            Scenario:       esResults.Scenario,
            Position:       e.model.Position,
            Employee:       e.model.Employee,
            EntityDept:     esResults.EntityDept,
            ProductLine_s:  esResults.ProductLine_s,
            Employee_m:     { ID: elemName },
            Value:          newValue
        });
 
        e.container.data("oldValue", newValue);
    }
},

And the datasource definition
this.ItemsDS = new kendo.data.DataSource({
    transport: {
        read: {
            url: this._url + "/EmployeeList",
            dataType: "json"
        },
        update: {
            url: this._url + "/TM1ViewWrite",
            dataType: "xml"
        },
        parameterMap: $.proxy(this._crudItemDS, this)                           
    },
    pageSize: 15,
    schema: {
       :     :    :    :    :

And finally the parameterMap (crud operations):
_crudItemDS: function (options, operation) {
    if (operation == "update") {
        if (this._employeeUpdates) {
            return { events: kendo.stringify(this._employeeUpdates) };
        };
    }
    return null;
},










Alexander Valchev
Telerik team
 answered on 08 May 2012
0 answers
158 views
Hello,

I would want to know how can I create a event onInit for numerictextbox

I see that in the source of this control there is a function init and at the end of this function there is a kendo.notify(that), I would want to know if I can profit this notify to get some event OnInit.

Maybe if I add a trigger programatically in Init definition and at the end I put something like  that.trigger("INIT");

Do you know the best way to do this? Maybe I could do something nice with events and people could create their own events. I need only an idea...

Is it possible?

Thanks in advance.
Daniel Botero Correa
Top achievements
Rank 1
 asked on 08 May 2012
0 answers
223 views
Hello guys!

I have this weird extra delay added in loading two tabstrips on same page in my MVC project (kendo Q1 2012 release)
The tabstrips are configured using contentUrls and in the jquery 'ready' script i i call kendoTabStrip on both tabstrips one after another.

I'm running in Chrome browser and monitor using developer tools network tab.(got the same behaviour also in Firefox, all browsers latest version)
The request URL of tabstrip(X) loads normally (waiting=10ms, receiving=5ms)
But request URL of tabstrip(Y) loads with extra delay (waiting=9ms, receiving=234ms) !!!

I tried swapping the calling order of tabstrips but then i get same results, on calling of second tabstrip URL.
tabstrip(Y) loads normally (waiting=10ms, receiving=5ms)
tabstrip(X) loads with extra delay (waiting=9ms, receiving=234ms) !!! 

So its not related to server side code, because each one if called first is fast but second consecutive call is extra slow.
And the data is not related from those two tabstrips so it be a deadlock at db level.

I have no clue why this is happening. Could surely appreciate your help guys.
johnsk
Top achievements
Rank 1
 asked on 08 May 2012
0 answers
71 views

 

I just want to use Kendo grid and when I select a row I want to take the details to the edit section and user do the modifications finally he should be able to click the save button and then changes should apply to the gird.

I try to do this up to some level. Here is the sample
http://jsfiddle.net/QWwnR/38/

Please suggest me a better approach to do this.

Thanks
Seminda

Seminda
Top achievements
Rank 1
 asked on 08 May 2012
1 answer
125 views
Good afternoon.

I am using the example of the buttons for Mobile  
 in an application Web,
as if each were selected button a "page" different.
I have a grid on each "page", just that when I click a button on a "page" different,
gives javascript error icons appear and ">" on each item on the grid with link.

What can I do to not give this error? 
Chnlove scam
Top achievements
Rank 1
 answered on 08 May 2012
0 answers
134 views
I would like to use placeholders for my forms, and when adding support for olders browser you are effectively replacing the contents of the input field with the placeholder value. Do you guys plan on releasing Placeholder support for older browsers, or at least a way for us to add a rule that ignores text if it == placeholder
Angel
Top achievements
Rank 1
 asked on 07 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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?