Telerik Forums
Kendo UI for jQuery Forum
2 answers
351 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
176 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
444 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
371 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
867 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
605 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
167 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
1 answer
125 views

Hi,

I have some Kendo mobile buttons, and outside a Kendo grid they're style is as expected  (ie. with "km-button" classes and data-icon="compose").

However when I put them into a grid (via an MVVM data-row-template), they change/lose their icons and style. Clearly this is because, being in the grid, they're inheriting from a kendo (k) class of the grid - and this overrides their kendo mobile (km) class.

Is there a easy way to render buttons in their kendo mobile form within a grid? Or somehow tell the grid to "act mobile"?

Many thanks

- Paul 

(I see in the kendo mobile demo grid here: https://demos.telerik.com/kendo-ui/m/index#grid/adaptive that most of its contents are rendered with Kendo (k) classes. Perhaps this means the grid excludes or does not support content with "km" classes?) 

 

ptw
Top achievements
Rank 1
 answered on 20 Nov 2016
1 answer
203 views

Hello,

I'm trying to export some columns in a grid without hiding them. Now I'm using something like this:

 var $grid = $('#grid').data('kendoGrid');

for(var i=0; i<columnsthatIdontneed.lenght;i++){

$grid.hideColumn(columnsthatIdontneed[i]);

}

 $grid.saveAsExcel();//or $grid.saveAsPDF();

for(var i=0; i<columnsthatIdontneed.lenght;i++){
$grid.showColumn(columnsthatIdontneed[i]);
}

I need a solution for export without hiding those columns.

Thanks.

Alex Hajigeorgieva
Telerik team
 answered on 18 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
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
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?