Telerik Forums
Kendo UI for jQuery Forum
5 answers
2.3K+ views

Hi,

i am trying to validate input for a combobox and trying to make sure that user entered/selected value from a pre-defined list of values. I am using MVVM. I tried this in two ways.

1. Using onChange event of the combobox
     I am able to validate the input as below.
     

selectionChanged: function (e) {
        if (e.sender.value() && e.sender.selectedIndex == -1)
        {
           //how to mark the control as invalid??
        }
    }

     Problem is i am not able to mark the control as invalid so that kendo framework displays the error message. I have a required validation on this field already.

2. Using rules
$(".entryform").kendoValidator({
        rules: {
            validRoom: function (input) {
                if(input.is("[name=Room]"))
                {
                    if (input.val() && input.selectedIndex != -1)
                    {
 
                    }
                }
                return true;
            }
        }
    });
Here there is no selectedIndex.

Please help.

Alexander Valchev
Telerik team
 answered on 11 Aug 2014
5 answers
882 views
I have a multiselect with 3 items selected, I want to add or append a fourth selected item. How do I do this?
Iliana Dyankova
Telerik team
 answered on 11 Aug 2014
1 answer
187 views
Hi Guys! 

First of all, sorry for my English.

I have a little problem with the inline edit feature.

In my dataSource I have these columns:

            columns =
            [
                    { id: 1, field: 'name', title: 'Name'                    },
                    { id: 2, field: 'extra_info', title: 'Extra Info'              },
                    { id: 3, field: 'localnames[0]', title: 'Localname 1', template: "#=name#" },
                    { id: 4, field: "localnames[1]", title: 'Localname 2', template: "#=name#"  },
                    { command: [{ name: "edit", text: "Edit" },{ name: "destroy", text: "Remove" }] }
            ];

In my list, i have an array "localnames", and when I was rendering the grid, in the column "Localname 1" and "Localname 2" the text was showing [Object]. To solve this I used "template: "#=name#"" to render the name of the object localname[0].

But now, while I'm using the inline-edit, when I click on the edit button, the grid show me [Object] to edit. How can I solve this?
Anyone had this problem before?

Thanks for your help and sorry for my English.






Alexander Popov
Telerik team
 answered on 11 Aug 2014
1 answer
882 views
Hi,

It seems that locked columns do not display properly if their width is set as a percentage rather than a fixed pixel width. Is this a known issue/limitation?

I modified the locked column demo to show the problem:

http://dojo.telerik.com/uCig

Percentages work fine as long as there are no locked columns, but as soon as one is added the grid no longer displays correctly.

Thanks,
Nick
Iliana Dyankova
Telerik team
 answered on 11 Aug 2014
8 answers
719 views
Hi:

I would like to bind the mouse-over event to items in a ListView.  I found this example with Observable.
    http://demos.telerik.com/kendo-ui/mvvm/event

<ul id ="listView2" class="k-list-container" style="width: 200px;"></ul>
<script id='officer-template2' type='text/x-kendo-template'>
    <li data-bind="events:{ mouseover: listener }"><h3>#= title #</h3> <div>#= name #</div></li>
</script>
<script type='text/javascript'>
    $("#listView2").kendoListView({
        dataSource: {
            data: [{ name: 'M.P.', title: 'President' },
                { name: 'J.O.C.', title: 'Vice President' },
                { name: 'P.H', title: 'Treasurer' },
                { name: 'B.R.M.', title: 'Webmaster' }]
        },
        template: kendo.template($('#officer-template').html()),
        selectable: true
    });
</script>

Phil
Kiril Nikolov
Telerik team
 answered on 11 Aug 2014
1 answer
114 views
Is it possible to implement DrapDrop on a mobile ListView?

I have the list set up like this:

var vm = kendo.observable({
           isVisible: true,
           onTest1: function (e) {
               kendoConsole.log("event :: test1(" + kendo.stringify(e.model, null, 4) + ")");
           },
           products: new kendo.data.DataSource({
               schema: {
                   model: {
                       id: "ProductID"
                   }
               },
               batch: false,
               transport: {
                   read: {
                       url: "http://demos.telerik.com/kendo-ui/service/products",
                       dataType: "jsonp"
                   }
               }
           })
       });

       kendo.bind($("#content"), vm, kendo.mobile.ui);
Kiril Nikolov
Telerik team
 answered on 11 Aug 2014
1 answer
140 views
I can't seem to find any examples of this.  I need to have a KendoUI grid that has server-side paging and uses angularjs $response or $http as it's data source.  Every example I have seen requires kendo.data.DataSource in order to accomplish server-side paging.
 Please advise.
Kiril Nikolov
Telerik team
 answered on 11 Aug 2014
2 answers
173 views
I already have loaded tooltip and grid but now I have problems with loading dropdownlist. It always runs into the timeout even if I waitSeconds: 200. For me it seems that there might be some dependency issues, but I have already checked all the baths and that looks ok.
What reason could there be to get the timeout?
CS
Top achievements
Rank 2
 answered on 11 Aug 2014
9 answers
300 views
Hello,

I am using app.navigate("homepanel.html") onClick event of a button from a login page..
On navigation to the homepanel.html, its contents are not displayed. Only the header and footer is displayed.
If I go directly to the page, everything works well and I see all the contents on the page. 
Please help to resolve this issue. I have attached the code for homepanel.html

Thanks for your time and help.


Kiril Nikolov
Telerik team
 answered on 11 Aug 2014
1 answer
95 views
Hello, i need to have the grid columns filtering and ordering based on the template value (the text that is shown on the column´s cells) and not based on the dataSource value, and i dont know how to achieve this but i´m sure this can be done easily.
For example, if i have the datasource [{'prop':'A'},{'prop':'B'},{'prop':'C'}], and the template renders 2 for A, 1 for B and 3 for C.
Expected ordering would be: 3,2,1 if descending, or 1,2,3 if ascending, but is 2,1,3 for ascending (i guess it´s ordering by the values in the dataSource, not the values in the template) and 3,1,2 for descending.
Same for filtering, if i filter value=3 i don´t see any match, i do see a match if i filter value=B though.
Thanks a lot.
Kiril Nikolov
Telerik team
 answered on 11 Aug 2014
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
Drag and Drop
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?