Telerik Forums
Kendo UI for jQuery Forum
0 answers
121 views
Is there some trick to exposing events in kendo-style plugins so that I can bind them using the declarative style? Currently I am just establishing the events on my plugins using the reserved "events" array field, using strings for their names. I thought that was enough, but when I attempt to bind them with the declarative style it keeps saying "Uncaught TypeError: Cannot read property 'change' of undefined". Any input on this?

Code examples: 
From plugin:
events: [
"error",
"change"
 ],

From declaration:
<div data-role="pluginname" data-bind="events: { change: testChange }"></div>

Where the plugin itself has been tested and is found by the bind, and the function "testChange" exists in the viewModel.
Joshua
Top achievements
Rank 1
 asked on 05 Jun 2012
1 answer
241 views
Hi,

I am having some problems when refreshing my grid view. I have a refresh button that calls refresh() from the grid documentation. It seems to do nothing. Then I tried sync() and read() but nothing seems to be actually refreshing my view of the grid information. Only when I filter the columns by clicking the column header is the change visible. When I click the header again the change disappears. Are there any cache settings here that may be getting in my way? Any help would be appreciated...

...
 dataSource : {
// JSONP is required for cross-domain AJAX
    dataType : "jsonp",
    transport : {
          read : baseURL + "Data;jsessionid=" + jsessionId + "?browserid=" + browserId + "&type=2&tool=fooBar",
                cache: false,
                contentType: "application/json; charset=utf-8",
                //
                // add additional parameters here...
                //
                parameterMap : function(options, type) {
                    options.cafe_dataplugin = "dispo_ticket_list";
                    options.cafe_fields = ticketColumns;
                    return kendo.data.transports["odata"].parameterMap(options, type);
                }
            },
...
Markus
Top achievements
Rank 2
 answered on 05 Jun 2012
0 answers
138 views
Hello!

I added a custom editor to a row of the grid, using the "editor widget" but, when I edit the cell and save the changes I get the following error:

Uncaught TypeError: Cannot read property 'field' of undefined   


and no data is send to de server. 


Am I doing something wrong?


I attached the following URL to represent the problem:
http://jsfiddle.net/M6VmL/1/ 



Thanks
Greetings
Swas
Top achievements
Rank 1
 asked on 05 Jun 2012
2 answers
120 views
hi

seems to be that incell editing isnt working if the selection mode is set to multiple.
the row goes to edit mode onclick, but the changes are reverted after an other row/field is selected.

Daniel
Top achievements
Rank 1
 answered on 05 Jun 2012
1 answer
184 views
I was wondering what styles I need to overwrite in order to change color of the tabs, both background and foreground, specifically for android.  I need the color to be lighter than the current tab colors.
Kamen Bundev
Telerik team
 answered on 05 Jun 2012
1 answer
125 views
i want to be able to drag and drop dataviz controls into a 2x2 table and save the selection to a database.

Do u have any examples?

thanks 
Iliana Dyankova
Telerik team
 answered on 05 Jun 2012
1 answer
488 views
I've got a page that uses as WCF web service to do some back-end processing. I can do it quite happily using a standard AJAX call. But I would like to do a similar thing using a Kendo DataSource. The test web service I'm calling simply takes a single argument called "param" and returns it back as: 
public string TestCallParam(string param)
{
    return "you passed: " + param;
}

Here is  the standard ajax call. Both the success and error functions display things for me properly. The data comes back as json data, with a single value called "TestCallParamResult". I can see this using fiddler as well as follows.

{"TestCallParamResult":"you passed: HI"}

$(document).ready(function () {
    $("#TextBox1").text("Starting");
    var args = new Object();
    args.param = "HI";
 
    $.ajax({
        type: "POST",
        url: "cccjq.svc/TestCallParam",
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify(args),
        dataType: "json",
        processdata: false,
        success: function (msg) {
            alert(msg.TestCallParamResult);
        },
        error: ServiceFailed
    });
 
})
 
function ServiceFailed(result) {
    alert('Service call failed.\r\nStatus = ' + result.status + '.\r\n' + result.statusText);
}

Here is my attempt at doing it using a datasource. I can see the data coming back in fiddler, but I'm probably wrong in the way I've defined the schema or am trying to access the result. I would like to see the alert actually display the contents of the returned string. I should add that Javascript & jquery are not my first language!

$(document).ready(function () {
    $("#TextBox1").text("Starting");
    var args = new Object();
    args.param = "HI";
 
    var ds = new kendo.data.DataSource({
        transport: {
            read: {
                type: "POST",
                url: "cccjq.svc/TestCallParam",
                contentType: "application/json; charset=utf-8",
                dataType: 'json'
            },
            parameterMap: function (options, operation) {
                return JSON.stringify(args);
            }
        },
        schema: {
            data: "TestCallParamResult",
            type: 'json'
        },
        change: function (e) {
            alert(x);
        },
        error: function (e) {
// dont know if this is right either 
            alert('Service call failed.\r\nStatus = ' + e.status + '.\r\n' + e.statusText); 
        }
    });
 
    ds.read();

One other thing on this - the service is called with or without the ds.read() call, is that normal?

Thanks,
Tom
Alexander Valchev
Telerik team
 answered on 05 Jun 2012
0 answers
583 views
Hi,

I am using column template for few of the columns. Adding hyperlink using these templates. Now, i want to pass the column value on click of this hyperlink and also a string. Right now, i am able to pass the column value, but not a string. Please help.

sample code of template :
    template:'<a href = "javascript:void(0)" onclick ="goToNewTab(\'#=firstname#\')">#=firstname#</a>'

I want to pass one more string as a parameter. How can i do that ?

Thanks,
Khushali
Khushali
Top achievements
Rank 1
 asked on 05 Jun 2012
2 answers
528 views
Hi,

I've been racking my head around this one for a while and simply can't figure out how to do it.

I've got a drop down list, and simply want to remove an item from it. I'm binding the drop down list in MVVM using the options binding to an array, which works fine.

Now, whenever I try to remove an item from this array, MVVM should auto-bind the options to the Drop down list and update the items. This, however, is not the case. I've also tried calling .refresh() on the drop down list to no avail.

I've tried doing this the jQuery way by removing individual li elements from the original <select> in my HTML, and then calling .refresh. This, again, does not work.

Are there any ideas out there in how I can achieve this? .filter etc is not valid for my scenario, I want to do this via an array that isn't going back and forth from the server.
Georgi Krustev
Telerik team
 answered on 05 Jun 2012
3 answers
276 views
This is probably going to be very confusing. Basically, I have a nested Grid as a Grid Details row. I want to be able to add a row to this nested grid, and can't seem to get it to work.

An example of the Grid as a Grid Details row is found here:
http://demos.kendoui.com/web/grid/detailtemplate.html

I want to be able to add a new row to this "Orders" grid within the "Employees" Grid.

Any thoughts?
Daniel
Top achievements
Rank 1
 answered on 05 Jun 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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?