Telerik Forums
Kendo UI for jQuery Forum
1 answer
319 views
To better explain what I'm looking to do I adapted a sample from the cascading dropdownlists. View JSFiddle example  The issue is with the data format...

Work flow is that we have selected a town. Then all the streets in that town are populated in DDL. Once street is selected, then all the street numbers on that selected street are populated in the last DDL.

Note: The mock data is a sample of the real data with much less. Code from the existing REST endpoint creation can be viewed in here: REST C# endpoint

What tweaks do I need to make to take advantage of this perfect example for a cascading dropdownlist?

Thanks in advance!
Alexander Valchev
Telerik team
 answered on 18 Nov 2013
3 answers
122 views
Hi,

Kendo Web 2013.2.918 no longer has the DropDownList.enable(enabled) function.  It appears that this has been removed from your documentation as well.  But, interestingly, it is still in the demos on your website.  Did you remove this?  Why?  Now I have to use readonly and then set the disabled styling manually which is doable but what a hassle for people upgrading.

Georgi Krustev
Telerik team
 answered on 18 Nov 2013
1 answer
277 views
Hi Kendo team,

I have a problem with reading the datasource. 

 data = new kendo.data.HierarchicalDataSource({
//----i am using this one---
                //transport: {
                //    read: function (options) {
                //        $.ajax({
                //            url: '/Inventory/GetcategoryTree',
                //            type: "GET",
                //            dataType: "json"
                //        });
                //    }
                //},
//-----or this one------
                transport: {
                    read: {
                        url: function () {
                            return '/Inventory/GetcategoryTree';
                        },
                        create: {
                            dataType: "json",
                            type: "GET",
                            cache: true
                        }

                    }
                },
                schema: {
                    model: {
                        id: "Id",
                        children: "Children"
                    }
                },
                scrollable: true,
                sort: { field: "CategoryName", dir: "desc" }
            });

Then i add the DS to the tree:


    var treeView = $("#treeview").kendoTreeView({
        dataSource: data,
        scrollable: true,
        dataTextField: "CategoryName",
        select: function (e) {
            this.expand(e.node);
        }
    }).data("kendoTreeView");

So now the problem is, when i call the treeView.dataSource.read() nothing happens and in debugger i see that the read() is undefined.(cant see it in the list of methods too)

Do you guys now when this ca occur, and under what circumstances. Is it the HierarchicalDataSource? I can see that the data source is there and i see the data too. However on break point in Chrome the dataSource is "B.extend.init"  
Atanas Korchev
Telerik team
 answered on 18 Nov 2013
1 answer
602 views
I want to collapse the node on single click. To do that i need to know if the node is expanded so i can call collapse(e.node)

Thanks a lot team
Dimiter Madjarov
Telerik team
 answered on 18 Nov 2013
1 answer
902 views
Hi !

i've got a problem to make my filter works,.
i'm doing a request to a file that contains some json code see below:

[
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058500","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058501","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058502","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058503","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058504","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058505","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058506","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058507","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058508","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"},
{"Adresse1":"1 RUE HERMARY", "CP":"62620","ID":"058509","Lat":"50,4597886","Long":"2,6139708","Nom":"PRESSING","Pays":"FR","Photo":"http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=FR065358","Ville":"BARLIN"}
]
and here is my request :

function getDataFromFileById(fl){
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: "./data.json",
                dataType: "json",      
            },
        },
        filter: { field: "ID", operator: "eq", value: fl }
    });
    console.log(dataSource);
    return (dataSource);
}
when i'm using this function without any filter, it works perfectly.
i read the doc and i did try to add some filter by the same way and i get an object but without my data ...
by the way the 'fl' parameter i use as filter is a number (058500).
am i doing something bad ? 
thanks for reading and answering,
best regards :)
Atanas Korchev
Telerik team
 answered on 18 Nov 2013
1 answer
240 views
Hello,

I want to render schedule in a day view but time line should be rendered horizontal. All of the demo examples include timeline in vertical orientation which seems default. Any help is appreciated?

thanks

pravin
Rosen
Telerik team
 answered on 18 Nov 2013
1 answer
228 views
I have an autocomplete textbox working with an odata endpoint. In addition to the $filter that kendo generates I'd like to add an additional filter to eliminate "deactivated" items.

The approach shown in the code below works for grids, but (understandably) kendo uses its own $filter and ignores mine (in particular below, see $filter: "Hidden -eq false" bit):

$("#product-entry-list input").kendoAutoComplete({
    filter: 'contains',
    dataTextField: 'Name',
    dataSource: {
        type: 'odata',
        serverFiltering: true,
        serverPaging: true,
        pageSize: 20,
        transport: {
            read: {
                url: window.rootUrl + 'odata/ProductLines',
                dataType: 'json',
                data: {
                    $filter: "Hidden eq false"
                }
            }
        },
        schema: {
            data: (d) => d.value,
            total: (d) => d['odata-count']
        }
    }
});

Is there a spot in the autocomplete or datasource API where I can inject custom filtering? Alternatively I suppose I could create a special ODataController for ProductLines that only shows active items, but it seems "nicer" to just have a single ProductLines OData endpoint and let the clients describe what they want.



Jason
Top achievements
Rank 1
 answered on 16 Nov 2013
4 answers
225 views
Hi!

I'm struggling a bit with recurring events again. This time, I'm trying to set up a monthly event to occur e.g. every first Wednesday. The event is rendered for some months, but not all. Also, the rendering does not seem to be consistent between views; e.g., the event might show up in Day View but not in Week View and so on.

The problems I reported earlier re. recurring events (which you fixed!) seemed to be related to a localized (Norwegian) setting, but this one also occurs in the online demos, e.g. the one at http://demos.kendoui.com/web/scheduler/index.html

Best regards,
  Gunnar


James Hood
Top achievements
Rank 1
 answered on 15 Nov 2013
2 answers
331 views
Attached is the latest UI i'm developing to manage our attachments.

UI Description:
The UI is not wrapped in a form element.
'Select file' is a custom command on the toolbar on the Grid with a custom template being the kendo upload control. (autoUpload=false)
The Grid is grouped by 'Component Type'.
Reset and Save Changes are working buttons that work with our model to ensure validation.


Once we attach a file the generated kendo button $(".k-upload-selected") when manually clicked Calls our onUpload method.
When we try to wrap it behind Save Changes button like in our UI - onUpload is not called when invoked with
$(".k-upload-selected").click();  

So how can i make it work when invoked through javascript?
$(".k-upload-selected").click();   what am i missing?






leblanc
Top achievements
Rank 1
 answered on 15 Nov 2013
2 answers
213 views
Hi there,

I have a grid with a field with a custom editor.  This editor consists of an input field, and I have applied validation to this using the HTML5 attributes (required, min, etc). The field uses data-bind syntax to get/set the data.

This works correctly and I get an error message when updating the field with invalid values.  
However there appears to be a big flaw to how this works, the data-binding occurs BEFORE the validation it would seem.

Even if I enter an invalid value. the change event still fires on the dataSource and the new invalid value is set.  
This seems to me to be unwanted behaviour, if there is an invalid value I do not want this set in the datasource.

Is this by design? How can I stop the data source updating on a validation failure?

Thanks in advance,
David Asbury.

ps.  It is also possible to bypass the validator simply by pressing the escape key.  This kills the validation message and removes focus from the invalid control.   This also seems like a bug. 
Rosen
Telerik team
 answered on 15 Nov 2013
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
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
LLM Kit
+? 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?