Telerik Forums
Kendo UI for jQuery Forum
6 answers
739 views
The dropdownlist opens and then closes when you click on the drop down button starting with release 3/22 (also happens in 3/27 release). I set all scripts being used to the most current release (3/27) and set just the dropdownlist.js script to the beta release script (2/29) and it works fine. After it does this the first time, the widget is then fine. It's just that first time you click on it, it open and then closes right away. All my dropdownlist do this on my page and some use remote datasources and some I set the datasource to some local data object. I tried remove the optionLabel and index options on the initialization but to no positive affect.

This is the code I am using to initialize my dropdownlist...

$("#serviceTypes").kendoDropDownList({
        height: 300,
        optionLabel: "select...",
        index: 0,
        dataValueField: "ServiceId",
        dataTextField: "ServiceName",
        dataSource: {
            transport: {
                read: {
                    type: "POST",
                    url: "../Services/Js/ServiceCommonService_Js.svc/GetServiceTypes"
                }
            },
            schema: {
                data: "d"
            }
        },
        change: function(e) {
            getSearchTerms();
        }
    })

Georgi Krustev
Telerik team
 answered on 22 Nov 2016
1 answer
144 views

Hi,

I was trying the MediaPlayer with playlist just like the demo here

http://demos.telerik.com/kendo-ui/mediaplayer/playlist

but I noticed that when I select another video from the list the timing and slider does not change, it keeps the duration of the first selected video 

see the attached image and notice the current time exceeds the duration which is not the video  actual

Eduardo Serra
Telerik team
 answered on 21 Nov 2016
2 answers
335 views

Here's what I've done:

  1. Created an Electron app, and verified that it works
  2. Copied the Kendo UI js and styles directories into my app's directory
  3. Modified the index.html file per the demo instructions to use a datepicker:
<!DOCTYPE html>
<html>
    <head>
        <title>Welcome to Kendo UI!</title>
        <link href="../telerik/styles/kendo.common.min.css" rel="stylesheet" />
        <link href="../telerik/styles/kendo.default.min.css" rel="stylesheet" />
        <script src="../telerik/js/jquery.min.js"></script>
        <script src="../telerik/js/kendo.all.min.js"></script>
    </head>
    <body>
        <input id="datepicker" />
        <script>
            $(function() {
                $("#datepicker").kendoDatePicker();
            });
        </script>
    </body>
</html>

 

However, when I run the app, I get a text box on the page; not the datepicker.

Is there something else I need to do?

 

Stefan
Telerik team
 answered on 21 Nov 2016
1 answer
168 views

Hi

I have a mvc view called "index" with a table of rows each with "Edit" button and on the top i have a "Create New" button. 

On "Edit" button click, I load a partial view with the details of row item. some of the controls are kendo datepickers. 

if i either click "Save" or "cancel" and then click another "Edit" button everything loads fine. 

But if i don't cancel or save but simply click on another row, my kendo datepicker controls disappear. I suspect it might be the way i am loading my scripts?! 

I followed the tutorial and included    

@Styles.Render("~/Content/kendo/css")
and     @Scripts.Render("~/bundles/kendo")
in my layout.cshtml. 

and triggered my datepicker with class 'datepicker' and script

        $('.datepicker').kendoDatePicker();

It might not be the problem with datepicker but may be the way load/unload should happen? I appreciate any help. 

Thanks

Georgi Krustev
Telerik team
 answered on 21 Nov 2016
4 answers
429 views
I'm having issues when we try to refresh our kendo grid if we use a factory promise in our datasource.  Here is a code sample of what we are trying to do:

In the html file:

<div data-ng-controller="ModalUserInbox as vm">
    <div kendo-grid="vm.grid" options="vm.mainGridOptions" height="300"></div>
</div>

In the controller:

vm.mainGridOptions = {
                dataSource: {
                    type: "json",
                    transport: {
                        read: 
                            function (e) {
                            UserInboxFactory.getUserInbox().
                            then(function (data) {
                                e.success(data);
                            });
                        }
                    },
                    schema: {  
                        model: {  
                            fields: {  
                                ColumnSelected: { type: "boolean" },
                                Extension: { type: "string", editable: false },
                                Subject: { type: "string", editable: false },
                                Client: { type: "string", editable: false },
                                CreatedOn: { type: "date", editable: false }
                            }  
                        }  
                    },
                    pageSize: 8,
                    serverPaging: false,
                    serverSorting: false,
                    autosync: true
                },

In the factory UserInbox:

function UserInboxFactory($http, $q, RequestContext, Utility) {
        var deferred = $q.defer();
        var service = {
            getUserInbox: getUserInbox
        };

        return service;

        function getUserInbox() {
            $http({
                method: "GET", cache: false,
                url: RequestContext.PathAPI + 'user/Message/UserInbox/'
            }).success(function (data) {
                deferred.resolve(data);
            }).error(function (response) {
                deferred.reject(response);
            })

            return deferred.promise;
        }
    }

This works great on first load but I added a refresh button which tries to refresh the data:

function refreshMessages() {
            var grid = $("#grid").data("kendoGrid");

            grid.dataSource.read();
            grid.refresh();
        }

I can see the call to get the data but the data never actually refreshes.  What am I doing wrong?  If I change the read to directly use the url from the factory everything works perfect.


Kiril Nikolov
Telerik team
 answered on 21 Nov 2016
3 answers
5.0K+ views
If I have a Grid with the selection mode cell how can I get the selected cells column name and database field?  I can get the row and all the items on the row but I'm having a bit of trouble finding anything with just the cell information.  It would be nice to get the row and the column index also of the selected cell. I need to create a new grid by filtering with the column field.

Thanks
Kiril Nikolov
Telerik team
 answered on 21 Nov 2016
6 answers
356 views

It appears setting the Expanded property in the ItemDataBound event doesn't work. Is that correct?  What options do I have?

For example:  Setting item.Expanded doesn't appear to do anything.  (I verified IsExpanded is true in my models)

@(Html.Kendo().TreeView()
  .Name("TestTree")
  .ExpandAll(false)
  .BindTo(Model.Items, mappings =>
  {
     mappings.For<MyModelClass>(binding =>
       binding.ItemDataBound((item, child) =>
       {
         item.Text = child.Name;
         item.Selected = child.IsSelected;
         item.Expanded = child.IsExpanded;
       })
       .Children(x => x.ChildItems)
     );
   })
 )

Veselin Tsvetanov
Telerik team
 answered on 21 Nov 2016
11 answers
854 views

All of our CRUD via inline grid / popups are being  are being followed by a full read of the datasource to keep things in synch (please see sample transport code).

I know this full refresh of the datasource is not necessary. I am trying to understand what is required :

1) Following a successful deletion do I need to delete a row from the grid and datasource and how?

2) Following a successful update do I need to set reset dirty flags to false? Anything else?

3) Following a successful insert how do return extract new key id value and use to synch grid and datasource ?

 

 

transport:
{
    read: function (options) {
        $.ajax({
            url: siteUrlRel  + "/Handlers/GenericHandler.aspx?sp=sp_getAddresses",
            dataType: "json",
            type: "GET",
            cache: false,
            contentType: "application/json; charset=utf-8",
            success: function (result) {
                options.success(result);
            }
        });
    },
    create: function (options) {
        $.ajax({
            url: siteUrlRel  + "/Handlers/GenericCRUDHandler.aspx?sp=sp_addAddress",

            data: encodePlus(kendo.stringify(options.data)),
            dataType: "json",
            async: false,
            type: "POST",
            success: function (response) {
                addressesDataSource.read();
            },
            error: function (response) {
                alert(response);
                addressesDataSource.cancelChanges();
            }
        });
    },
    update: function (options) {
        $.ajax({
            url: siteUrlRel  + "/Handlers/GenericCRUDHandler.aspx?sp=sp_updateAddress",

            data: encodePlus(kendo.stringify(options.data)),
            async: false,
            dataType: "json",
            type: "POST",
            success: function (response) {
                addressesDataSource.read();
                UpdateMessage("Addresses changes applied");
            }
        });
    },
    destroy: function (options) {
        $.ajax({
            url: siteUrlRel  + "/Handlers/GenericCRUDHandler.aspx?sp=sp_deladdresses",
               data:encodePlus(kendo.stringify(options.data)),
            async: false,
            type: "POST",
            success: function (response) {
                addressesDataSource.read();
            },
            error: function (response) {
                alert(response.responseText);
                addressesDataSource.cancelChanges();
            }
        });
    },
    parameterMap: function (options, operation) {
        if (operation !== "read" && options.models) {
            return { models: kendo.stringify(options.models) };
        }
    }
},

Stefan
Telerik team
 answered on 21 Nov 2016
4 answers
591 views

I am trying the following code to change the border bottom color of an 'li' element in a list-view

http://dojo.telerik.com/ApIp/27

It does not work

Could you please let me know what's the issue ?

 

devApps
Top achievements
Rank 1
 answered on 21 Nov 2016
1 answer
155 views

There's probably a simple way to do this but I'm darned if I can figure out what.

I want to build a stacked bar chart roughly similar to the example at http://demos.telerik.com/kendo-ui/bar-charts/stacked-bar. The chart will show the top-N user activity per day. So for today, let's say that Alice did 100 units of work, Bob did 75, and Carole did 82. I want the stack to reflect that. Yesterday Mike did 75, Alice did 84, and Eve did 84.

I'm having a hard time figuring out how to get the stacks to reflect my data. Basically what I want is a stack for each day, with each "slice" of the stack showing activity. All of the Kendo chart types seem to assume that you'll have the same stacks every day, e.g. that every day I want to show what Alice, Bob, and Carole did. What I actually want is to show a stack per day where the components of the stack show (and the tooltip reflects) whatever the most active users for that day did. The same users may be most-active on multiple days but they may not.

Is there a straightforward way to do this with the built-in chart types?

Iliana Dyankova
Telerik team
 answered on 21 Nov 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?