Telerik Forums
Kendo UI for jQuery Forum
4 answers
360 views
For instance the thumbnail -

                                thumbnailUrl: function (path, name) {
                                    //alert(path + name)
                                    path = myDir + "/Test/images/"
                                    return path + name;
                                },

- can be overridden by calling this function passing the variables. I am curious as to if there is a work around for "uploadUrl:" aswell.
As of now it will not let me use a function or define a url inside the Definition.


This will not work-
uploadUrl: function (passedValue?) {
    //perform ajax
}

If this is possible i have not came acrossed what values are being passed.
i know the return value must be formatted like this-
{ "name": "foo.png", "type": "f", "size": 12345 }


This is the only format that will work and it doesnt call my Action.
uploadUrl: "UploadFile.aspx/Upload",

laf
Top achievements
Rank 1
 answered on 29 May 2015
4 answers
449 views
In a recent blog post on styling you used the following:
<span class="k-textbox k-space-right">
    <input id="lastName" type="text" />
    <a href="#" data-bind="click: clear">
        <span class="k-icon k-i-close"></span>
     </a>
</span>

which works great for regular inputs.  However, I would like to add a + button to a Combo or DropDown.  How would I go about doing that?
Casimodo
Top achievements
Rank 1
 answered on 29 May 2015
2 answers
1.9K+ views

In 'older' code in our system it seemed necessary to use a <select> element at all times when invoking and binding to a kendo ComboBox. Now, we note that there is less variance between using an <input> element and the performance appears to be identical.

I notice that in the dojo, if there exists a fixed set of options and no dataSource, <select> is used and then the element is just initialized as kendoComboBox. On the other hand, any time a dataSource is provided, whether locally or remotely, the dojo uses the <input> element.

When viewed in the source, there seems to be little variance except for the <select>/<input> shown after the k-dropdown-wrap. Both of which are hidden from display anyways.

Do you have any 'input' on this?

beauXjames
Top achievements
Rank 2
 answered on 29 May 2015
1 answer
134 views

Hello. I have a line chart created via the MVC extender. I have various controls on the page to display data for a given year-long interval. This is done by using the filter() method on the chart's data source object. There are also multiple sources of data that can be selected by the user. These are implemented by calling the read() method. Now not all sources have data for the same time periods, so rather than leave the user staring at an empty chart I want to reset the date range when the data source read is called. Unfortunately calling both read() and filter() redraws the chart. Is there any way to prevent that?

 

Thanks,

Boris

T. Tsonev
Telerik team
 answered on 29 May 2015
6 answers
913 views
Is there a way to alter the text that is displayed in validation messages, rather than using the field names from the model?

For example, I have a datasource hooked up to a Grid and certain fields are required, but the internal field names are not exactly fit for display. So, if I have a field named 'user_first_name': rather than a message like: 'user_first_name is required' I'd like an easy way to specify an alias for the field name to produce 'First name is required'

I know it's possible to define custom validation messages, but the standard messages are generally fine, except for the field names. It seems like a lot of work to define loads of custom messages, when all I need is to replace the field name.

Any suggestions?
Alexander Popov
Telerik team
 answered on 29 May 2015
2 answers
102 views

How i make a diagram with a fill color in gradient ?

 Like this: 

 

Pablo
Top achievements
Rank 1
 answered on 29 May 2015
1 answer
198 views

Dear Support team, 

We found an error that multi checkbox filter panel is not refreshing after changing data source in mvvm style. More is shown in attached dojo and screencast:

http://dojo.telerik.com/opURA

http://screencast.com/t/F4nzqodS

We created workaround about this error:

kendo.ui.FilterMultiCheck.prototype.refresh = function(e) {
    var forceUnique = this.options.forceUnique;
    var dataSource = this.dataSource;
    var filters = this.getFilterArray();
  
    if (this._link) {
        this._link.toggleClass("k-state-active", filters.length !== 0);
    }
  
    if (this.form) {
        if (e && forceUnique && e.sender === dataSource && !dataSource.options.serverPaging)
        //     (e.action == "itemchange" || e.action == "add" || e.action == "remove"))
        {
            this.checkSource.data(distinct(this.dataSource.data(),this.field));
            this.container.empty();
        }
  
        if (this.container.is(":empty")) {
            this.createCheckBoxes();
        }
        this.checkValues(filters);
        this.trigger('refresh');
    }
}

Problem was lack of field action in event parameter when change is done from mvvm. When we removed this condition application started working properly.

 

Marcin (Szwagier) Bębenek

Nikolay Rusev
Telerik team
 answered on 29 May 2015
1 answer
735 views

Hey Guys,

I have been stuck on this issue for a day now and still can’t figure it out.  
The issue is that the drop down list in the grid column always return 'undefined' after selecting an item and moving to the next column.  
It will display the last selected item if I go back to the drop down list.  I am not sure if I need to refresh the grid or it's not proper bind to the field.
Any help is appreciated.  Below are the codes.

 

TIA


A call back for json and literate through a loop to set up my data

var ds = new kendo.data.DataSource({
            transport: {
                read: function (options) {
                    var myData = [];

var tCounter = 0;
json call here ......
function (result) {
  for (var i = 0; i < result.length; i++) {

for (var j = 0; j < result[i].TS.length; j++) {
var rData = [];

for (var m = 0; m < result[i].TS[j].DRP.length; m++) {                                
rData[m] = {                                                                                                    
nextId: result[i].TS[j].DRP[m].Id,                                                    
nextDesc: result[i].TS[j].DRP[m].Description
}
}

myData[tCounter] = {
...other variables
rList: rData,
};
tCounter ++;
};
                    };                                                      
});
options.success(myData);
              }
            },
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        JN: { editable: false },
                        TI: { editable: false },
                        rList: { editable: true }
                    }
                }
            },
        });


        var test = $("#grid").kendoGrid({
            dataSource: ds, 
            columns: [
            {
              ...'other column settings'
            },
            {
                field: 'rList',
                title: 'Next',
                width: 200,
                template: "#=rList.nextDesc#",   // I think is causing the issue
                editor: dropDownEditor
            },
    }],
editable: true,
navigatable: true
}).data("kendoGrid");


   function dropDownEditor(container, options) {
        var iData = [];
        for (var i = 0; i < options.model.rList.length; i++) {
            iData.push({ nextDesc: options.model.rList[i].nextDesc, nextId: options.model.rList[i].nextId });
        }

        //iData = [{ nextDesc: "ABC", nextId: "123" },
        //                 { nextDesc: "CDF", nextId: "456" },
        //                 { nextDesc: "HIJ", nextId: "789" }];
        var ddl = $('<input data-text-field="nextDesc" data-value-field="nextId" data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                optionLabel: ' ',
                autoBind: false,
                dataSource: iData,
                dataTextField: "nextDesc",
                dataValueField: "nextId"

            });
    }

Georgi Krustev
Telerik team
 answered on 29 May 2015
1 answer
126 views

Hi, I have encountered this strange error that was not present earlier.

The back button in a navbar, causes a jquery error, this is reproducible also in one of your demos:

http://demos.telerik.com/kendo-ui/mobile-view

Simply go to the local view then click back, you'll get an error like:

Uncaught Error: Syntax error, unrecognized expression: #!

 

Petyo
Telerik team
 answered on 29 May 2015
1 answer
98 views

Is it possible to define a toolbar with overflow button in html instead of java script?

When I create the toolbar in html there is no <ul> tag with k-overflow-container which contains the button in toolbar. 

Example:

<div kendo-toolbar >

     <button type="button" name="btnNewBeleg" class="btn btn-primary" ng-click="newBeleg()" data-overflow="auto">new</button>

</div>

Alexander Valchev
Telerik team
 answered on 29 May 2015
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)
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?