Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.6K+ views

I have an issue with restoring the selection in a Kendo dropdownlist after my application loads data from the database. When I set a breakpoint after restoring the selection, I can see that the dropdownlist has been set properly to the value to restore. However, when I continue after the breakpoint, the dropdownlist resets to its default value. What is causing the dropdown to reset?

We are using Kendo UI v2016.1.322, Internet Explorer 11.0.9600.18314, and Windows Server 2008 R2 Enterprise.

This is the markup for the dropdownlist :

<div class="panel panel-default" id="carEntriesPanel"
     ng-repeat="carEntry in carEntries[selectedRouteIndex]">

    <select class="form-control" kendo-drop-down-list k-options="kdCarTextOptions"
     id="{{'carTextDropdown-' + $index}}" ng-model="carEntry.carTextSelected.id"
   </select>  

</div>

These are the options and data source:

            $scope.kdCarTextOptions = {
                optionLabel: 'Please Select',
                dataSource: $scope.carTextDropDownDataSource,
                dataTextField: 'name',
                dataValueField: 'id',
                select: $scope.onSelect
            };

            $scope.carTextDropDownDataSource = new kendo.data.DataSource({
                transport: {
                    read: function (options) {
                            options.success($scope.carTexts[$scope.selectedRouteIndex]);
                    }
                }

This is the onSelect method:

           $scope.onSelect = function (e) {
                var dataItem = this.dataItem(e.item);
                $scope.carEntries[$scope.selectedRouteIndex][$scope.carIndex].carTextSelected.id = dataItem.id;
                $scope.carEntries[$scope.selectedRouteIndex][$scope.carIndex].carTextSelected.name = dataItem.name;
            };
        }

This is the method that restores the dropdown selection. By setting breakpoints, I could see that the dropdownlist does show the restored value, and onSelect is called after the select is triggered. But when I continue after the trigger, the dropdownlist resets to its default value.

            function updateCarTextDropdown(carIndex, carEntry) {

                var dropdown = angular.element('#carTextDropdown-' + carIndex).data('kendoDropDownList');
                if (dropdown) {
                    dropdown.dataSource.read();
                    if (carEntry.car.CAR_TXT_ID !== undefined) {
                        dropdown.value(carEntry.car.CAR_TXT_ID.toString());
                        dropdown.trigger('select');
                    }
            }

Alex Hajigeorgieva
Telerik team
 answered on 22 Jul 2016
2 answers
180 views

Hi,

 

I am using grid with server side pagination/filtering & column checkbox. Lets say, I have specified page size = 25. My requirement is if user has applied some filter and total records are less than 500, then user should be able to Check All records across multiple pages. Right now, Check All selects only current page records.

Alternative could be, If I can dynamically change the page size to ALL, that should also solve this. 

Regards,

Sanjay

Sanjay
Top achievements
Rank 1
 answered on 22 Jul 2016
3 answers
233 views
Hi I’m we are using kendo scheduler in our project and I’m trying to develop customize   event templates base on status of event whether it is confirmed or planned or canceled 
Vladimir Iliev
Telerik team
 answered on 22 Jul 2016
5 answers
4.2K+ views
Is there a way to set the titleBar color for an individual kendo window?

Current I have tried:

$('#myWindow').kendoWindow({ settings });

followed by:

$('#myWindow').parent().find('k-window-titlebar').css('backgroundColor', '#fe2712');

Which works, but leaves a blank spot. Any ideas if there is a better way to go about this?
Dimo
Telerik team
 answered on 22 Jul 2016
1 answer
147 views
Hi,

We're using the kendo framework with javacript and start wondering if Gannt could have options to filter the tasks with a column menu, like we can see in Grid.

http://demos.telerik.com/kendo-ui/grid/column-menu



This is important  to filter and save the filters that our user creates.
Bozhidar
Telerik team
 answered on 22 Jul 2016
1 answer
158 views

Hi, I would like to do a "Top 4" ordered Bar Chart but I cannot sort the grouped value results and include only the best 4 values

(I do not sum values but I just count the items in each group)

see the Dojo Code

 

 

Alex Hajigeorgieva
Telerik team
 answered on 21 Jul 2016
6 answers
646 views

I am trying to load remote HierarchicalDataSource to Kendo-UI TreeList with loadOnDemand. I see that the data function is called with the response that consists the first element . But the data is not displayed in the TreeList, instead the message 'No records to display' appears.

Also have notice that the function hasChildren is not called. (BTW: this code works with TreeView)

 

Please advice. 

 

Greg
Top achievements
Rank 1
 answered on 21 Jul 2016
4 answers
207 views

I created a stacked chart on "Component" with a sort on the "Code" column. With the stacked column the chart sorts correctly on Code with 11 coming before 54. But when I switch to the stacked/grouping mechanism on Component the sorting switches to 54 and then 11. It might be due to something else but all I can think of is the stacked variable took over the sorting. My example is located at http://dojo.telerik.com/@dhighfield/EfuVA/3. I am expecting the Code 11 to always come before 54 since I have sorting set to Code.

Thank you for your time and assistance as always.

David
Top achievements
Rank 1
 answered on 21 Jul 2016
1 answer
1.9K+ views

I cloned you example page here.

http://dojo.telerik.com/@cchu/ONOZi

Is there any why I can disable or enable that create button and those Edit and Delete ones by some condition?  Maybe a Boolean value defined somewhere in View Model. 

if that value changes it's able to refresh the status of those buttons. 

Dimiter Topalov
Telerik team
 answered on 21 Jul 2016
1 answer
269 views

I'm trying to figure out how to retain the aspect ratio of image elements that are resized.
In principle it seems like this can be handled by setting the SVG image element's preserveAspectRatio property to "xMidYMid meet" or the like.
I cant figure how to apply this property in the template (which would be the ideal place to apply it).

I've tried manually applying the property after the itemboundschange but this doesnt seem to work until the diagram is reinitialized after a page refresh.

Any suggestions?

Vessy
Telerik team
 answered on 21 Jul 2016
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?