Telerik Forums
Kendo UI for jQuery Forum
4 answers
359 views

I have two schedulers. Both use an identical datasource and identical templates. They are almost identical with the exception that the second scheduler allows editing with the editable.template property set. The first scheduler is static and is created on page load (actually on view load with MVVM). It displays all events correctly. The second scheduler is created inside of a popup window. The second is instantiated via a function called on a click event that is bound via MVVM. I am able to create events from the second scheduler, but events found in the datasource (scheduler datasource) are not displaying in the second scheduler yet they are in the first static scheduler. Could this be a side affect of the window widget? We are using 2014Q3. Any ideas on why the data passed to the read event of the datasource is not updating the calendar? I've verified that the data is in the DS by listening for the dataBound event on the scheduler and that the data matches the DS's model schema. No exceptions are being thrown. I can drill down into the DS and see the events, they are just not showing up in the view. Below is the code:

01.openCalendar: function(e) {
02.     var windowWidth, scheduleWidth, win;
03.    if(isMobile) {
04.     windowWidth = "500px";
05.       scheduleWidth = 480;
06.      } else {
07.        windowWidth = "600px";
08.        scheduleWidth = 580;
09.      }
10.    win = $("#subscribers-calendar-window").kendoWindow({
11.        title: "Appointments",
12.        visible: false,
13.        width: windowWidth,
14.        height: "550px",
15.        resizable: false,
16.        modal: false,
17.        draggable: true,
18.        deactivate: function() {
19.         // Remove pre-existing scheduler elements from the window...
20.           $("#subscribers-calendar").find("div.k-floatwrap.k-header.k-scheduler-toolbar").first().remove();
21.           $("#subscribers-calendar").find("div.k-header.k-scheduler-footer").first().remove();       
22.           $("#subscribers-calendar").find("table.k-scheduler-layout.k-scheduler-agendaview.k-scheduler-agenda").first().remove();
23.           $("#subscribers-calendar").find("table.k-scheduler-layout.k-scheduler-dayview").first().remove();
24.           $("#subscribers-calendar").find("table.k-scheduler-layout.k-scheduler-weekview").first().remove();
25.           $("#subscribers-calendar").find("table.k-scheduler-layout.k-scheduler-monthview").first().remove();
26.        },
27.        activate: function() {
28.           _.delay(function() {
29.             var dateString = moment().format("YYYY/MM/DD"),
30.              startDate = dateString + " 05:00",
31.              endDate = dateString + " 22:00",
32.              scheduler = $("#schedule-scheduling-subscribers-calendar").kendoScheduler({
33.                 dataSource: DataSourceManager.getAppointmentsDS(),
34.                 width:scheduleWidth,
35.                 allDaySlot: false,
36.                 startTime: new Date(startDate),
37.                 workDayStart: new Date(startDate),
38.                 endTime: new Date(endDate),
39.                 workDayEnd: new Date(endDate),
40.                 workWeekStart: 0,
41.                 workWeekEnd: 6,
42.                 editable: {
43.                  template: $("#appointment-edit-popup-template").html()
44.                 },
45.                 add: editOfAppointment,
46.                 change: editOfAppointment,                         
47.                 messages: {
48.                    views: {
49.                       agenda: "Scheduled Events"
50.                    }
51.                 },
52.                 views: [
53.                   {
54.                    type: "day",
55.                      allDaySlot: false,
56.                      eventTemplate: $("#schedule-module-day-item-event-template").html()
57.                   },
58.                   {
59.                      type: "week",
60.                      eventTemplate: $("#schedule-module-day-item-event-template").html()
61.                   },
62.                   {
63.                      type: "agenda",
64.                      eventTemplate: $("#schedule-module-appointment-item-event-template").html()
65.                   }
66.                 ]
67.              }).data("kendoScheduler");
68.           }, 250);
69.       }
70.    }).data("kendoWindow");
71.      win.center();
72.      win.open();
73.}

Vladimir Iliev
Telerik team
 answered on 01 Mar 2016
1 answer
154 views

Hi,

I'm having some trouble getting the KendoDatePicker control to automatically open when its cell is selected in my editable Kendo Grid control while using AngularJs.

My editable column is defined as so:

gridColumns.push({
    field: currentField.FieldName.replace(/ /g, "_"),
    title: currentField.FieldName,
    format:"{0:yyyy-MM-dd}",
    editor: $scope.dateTimeCmtEditor,
    template: "#= (" + currentField.FieldName.replace(/ /g, "_") + " == null || (typeof " + currentField.FieldName.replace(/ /g, "_") + " == 'undefined')) ? ' ' : kendo.toString(kendo.parseDate(" + currentField.FieldName.replace(/ /g, "_") + ", 'yyyy-MM-dd'), 'yyyy-MM-dd') #",
    width: 150
});

 

And my editor is defined like so:

$scope.dateTimeCmtEditor = function (container, options) {
    $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>')
            .appendTo(container)
                .kendoDatePicker({});
};

 

I would like the date picker to open automatically when the user either clicks in the cell or navigates to the cell using the keyboard and hits Enter.

Thanks,

Ian

Alexander Popov
Telerik team
 answered on 01 Mar 2016
1 answer
61 views

Hello,

I noticed that the kendo UI Grid automatically uses the km javascript scrollbar on the iPad. Is there any way to turn this off and just use the native scrollbar?

 

Thanks and best wishes,

Alexander

Petyo
Telerik team
 answered on 01 Mar 2016
1 answer
181 views

Hi All,

I have a page which call a partial view page and all the command buttons lost their click event once returned.  I called a function from the dataBound of the grid to rebind the click event for the buttons and it works, but how do I rebind for a template dropdown?

...

dataBound: function(e) {
                rebindGridObjects();
            },

columns:[{

                   field: 'ReportList.Description',
                    title: 'In Reports',
                    width: 135,
                    template: "#=reportTemplate(ReportList,Report.Description)#",
                    editor: function invoiceReportsDropDown(container, options) {
                        if (options.model.ReportList.length <= 1)
                            return;
                            $('<input data-text-field="Description" class="reportListItems" data-value-field="Id" data-bind="value:' + options.field + '"/>')
                                    .appendTo(container)
                                    .kendoDropDownList({
                                        dataSource: options.model.ReportList,
                                        dataTextField: "Description",
                                        dataValueField: "Id",
                                        change: function (e) {
                                            selectedReport = e.sender.value();
                                            ......
                                               
                                            }
                                        }
                                    });
                    },

 {
                    command: [
                        {
                            name: "test",
                            text: "test",
                            click: testLogic
                        }
                    ],                    
                    title: "",
                    width: 90
                },

 function rebindGridObjects(e) {        
        $("#igrid .k-grid-content").find(".k-grid-test").bind("click", function(e) { testLogic($(this)); });    //work with command button

}

 

function reportTemplate(){

..getting the report

}

 

TIA

Nikolay Rusev
Telerik team
 answered on 01 Mar 2016
2 answers
184 views

How can I use the three bar symbol only for triggering my menu?  Please take a look at the top example here, it has both the three bar icon from font awesome but it also has the caret next to it.

http://dojo.telerik.com/@pacific202/uSiqa/2

Graham
Top achievements
Rank 1
 answered on 01 Mar 2016
2 answers
1.3K+ views

Hi, i'm wondering if it is possible to style a checkbox such that the label text is before the checkbox control, rather than the other way around.

My markup being something like so:

    <input id="wid" class="ax-unselectable k-checkbox" type="checkbox"> <label for="wid class="k-checkbox-label">label text</label>

There are a number of :before and :after rules associated with k-checkbox-label, but i don't see any obvious mechanism to get the label to come first.

Anyone ever done or requested that?

 

Thanks

roger

Roger
Top achievements
Rank 1
 answered on 29 Feb 2016
5 answers
172 views

Hi ALL,

 Now I save the grid's Persist State into my database, my way is convert the grid's options to json first, then transfer to my server and save into database.

My way to convert the grid's options is using custom implementation js, please refer to PersistState1.png. It can convert, save into database, load from database correct. It can work fine except below situation,

1, When my datasource bind with schema fileds type like boolean, date. these two type will make error when load data, error message refer to PersistState2.png, PersistState3.png. The relevant code is PersistState4.png

This issue just occur when apply the Persist State from server, if I comment the boolean, date type field out, then I can load data fine.

 

So I am think if the custom implementation js can convert the grid's options well or there maybe some variable (like the dt and ft in screen) need to be redeclare?

Boyan Dimitrov
Telerik team
 answered on 29 Feb 2016
1 answer
140 views

Hi there,

Is there any possibility to get the Object from a String?

my object is  

var Global = { ChartManager: { ChartElements: [] }, ....};

and my string is:

Global.ChartManager.ChartElements

and i want to get back the empty array:

[]

 

Thanks for helping me!

Petyo
Telerik team
 answered on 29 Feb 2016
1 answer
189 views

Hey,

 

I am trying to format the tabs of the tabstrip as a separate entity. I want to have a gap in between the tabs horizontally. Here is my html code. Can you help me with the classes/styles that I need to modify in order to achieve my design. Thanks

<div id="tabstrip">
      <ul>
      <li class="tab-apart">TEST 1</li>
      <li class="tab-apart">TEST 2</li>
      <li class="tab-apart">TEST 3</li>
    </ul>

     <div>Content 1</div>
      <div>Content 2</div>
      <div>Content 3</div>

</div>

Petyo
Telerik team
 answered on 29 Feb 2016
10 answers
738 views
When creating a DatePicker that looks like:
$("#dobPicker").kendoDatePicker({
    min: new Date(1900, 0, 1),
    max: new Date(),
    depth: "decade",
    start: "decade"
});

I can not get the start value to start the DatePicker in any depth but the default. I also can not seem to get the depth value to limit the depth of the DatePicker.
Georgi Krustev
Telerik team
 answered on 29 Feb 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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?