Telerik Forums
Kendo UI for jQuery Forum
6 answers
524 views
Hello,

The scenario is this - I have a dropdown representing time intervals - 5 , 10, 15, 20, 30 minutes, and a Scheduler where the MajorTick is set to 60 and MinorTickCount is set to 4.
After the page is loaded, the scheduler renders with 4 times slots for each hour (15 mins for each each slot).

I need to change at runtime the MinorTickCount of the scheduler in function of the dropdown value. Is that possible ?
I have tried like shown below, but without success:

var scheduler = $("#scheduler").data("kendoScheduler");
scheduler.view("week");
scheduler.minorTickCount=4;
scheduler.refresh();

Any advices ?

Thanks
Rosen
Telerik team
 answered on 03 Mar 2015
3 answers
229 views
Hi folks,
I have a paginated grid, and in one column, I'm using tooltips.

Three questions:

1) Tooltips don't seem to function once I go to a different 'page' (using the grid pagination), and only the standard title browser element displays - I've confirmed it in IE9 (yikes, yeah, I know..) and the latest chrome - confirm or deny?

2) I need to make the tooltips so they scroll if there's too much content (because there can be a ton..), and

1.#grid .k-tooltip {
2.  max-height: 400px;
3.  overflow-y: auto;
4.}

seems awfully sloppy.. 

AND...

3) I need to be able to mouseover the tooltip as well and have it persist, as the user may need to scroll.. 

Thank you very much!

Alex Gyoshev
Telerik team
 answered on 02 Mar 2015
3 answers
2.4K+ views

hi,

I have used a grid with popup editing. I want to use only the destroy et create command of the grid. Its working fine but i want to change the text of that Update and Cancel button in the popup.

For override text, i find this solution but it dysplay the edit button and i don't want to dysplay this button and not define Update action.

command.Edit().UpdateText("Custom Text").CancelText("Custom Text");

@(Html.Kendo().Grid<Modele>().Name("Grid")
                .ToolBar(toolbar => toolbar.Create())
                .Columns(columns =>
                {
                    columns.Bound(a => a.FirstName);
                    columns.Bound(a => a.LastName);                    
                    columns.Command(command =>
                    {
                        command.Edit().UpdateText("Custom Update").CancelText("Custom Cancel");
                        command.Destroy();
                    });
                })
                .Editable(editable => editable.Mode(GridEditMode.PopUp)
                .Window(w => w.Resizable()))
                .DataSource(dataSource => dataSource.Ajax().Batch(false)
                .ServerOperation(false)
                .Events(events => events.Error("error"))
                .Model(model => model.Id(a => a.FirstName))
                .Update(update => update.Action("FakeUpdate", "Controller"))
                .Read(read => read.Action("Read", "Controller"))
                .Create(read => read.Action("Create", "Controller"))
                .Destroy(read => read.Action("Destroy", "Controller"))))

Thanks.

Alexander Popov
Telerik team
 answered on 02 Mar 2015
1 answer
1.0K+ views
So, I have an input to determine a currency type and a separate input to enter an amount. I'd like to dynamically change the numerictextbox that accepts the amount to display the symbol reflected in the first input. I can specify a currency symbol fine by using a custom culture on the load of the textbox fine, ala:

var thisculture = kendo.culture();
thisculture.numberFormat.currency.symbol = 'Â¥';

$("#salary").kendoNumericTextBox({
format: "c",
culture: thisculture,
decimals: 3,
    });

But if I bind something to the change event of the other input (a combobox in this instance), it removes the currency symbol but doesn't update it:

$('#salarycurrency).data("kendoComboBox").bind('change', function (e) {
console.log('change currency');
var selectedRows = this.select();
var dataItem = this.dataItem(selectedRows[0]);
var newculture = kendo.culture();
newculture.numberFormat.currency.symbol = '$';
$("#salary").kendoNumericTextBox().culture(newculture);
    });

Is what I'm trying to do even possible with this control? Thanks.
​
Petyo
Telerik team
 answered on 02 Mar 2015
1 answer
291 views
Hi,

I'm using the Razor HtmlHelper for the ComboBox populating the items on-demand and filtered much like your cascading combobox demo (http://demos.telerik.com/aspnet-mvc/combobox/cascadingcombobox). However my combobox needs to pass multiple filters to the server in a specific JSON object (filters must form part of an array) and data is returned in a JSON object. In summary I really need to have complete control of the request and response handling and would like to know the approach you'd recommend. Would a custom datasource be best with a parameterMap? I've not seen a real in-depth demo of how this is done with the Razor HtmlHelpers.

Lastly the server filtering I'm using adds in the filters currently like the demo mentioned above whereby you specify a javascript function name to supply the additional filters e.g. Data("filterProducts");. However I'm finding this rather limiting as I have a large number of comboboxs and each one must have it's own method, they all do the same thing pretty much however they rely on custom data attributes on the combobox box itself. Is there a way to have the combobox object/selector passed into the function?

Thanks,
Shane
Alexander Popov
Telerik team
 answered on 02 Mar 2015
1 answer
764 views
Hi

I have a simple Kendo Scheduler Demo: http://dojo.telerik.com/IqIYI/7

In this demo I have a custom edit template defined as follows:

    <script id="editor" type="text/x-kendo-template">
       <h3>Edit meeting</h3>
       <p>
           <label>Title: <input name="title" /></label>
       </p>
       <p>
           <label>Start: <input data-role="datetimepicker" name="start" /></label>
       </p>
       <p>
           <label>End: <input data-role="datetimepicker" name="end" /></label>
       </p>
    </script>

This template has 2 buttons in create-new-mode and 3 buttons when in edit-mode by default.

I am now trying to add a 4th button to the edit popup and then catch its click event and do something else (create a new popup filled with the one of the event - functionality of "edit as new").

I am adding this button through the edit event of kendo in the case of an edit of an actual event (fired whenever the popup template loads).

      edit: function(e) {
        if (!e.event.isNew()) {
        $(".k-edit-buttons.k-state-default").prepend('<a class="k-button" id="editasnew">Edit as New</a>');
         }
      },

The button has an id="editasnew", and then a click event catcher:

      $('#editasnew').click(function(){
        console.log("edit now");
        var scheduler = $("#scheduler").data("kendoScheduler");
        scheduler.cancelEvent();
    
        setTimeout(function(){
          console.log("add new event now");
          scheduler.addEvent({ title: "(No title)" });
        }, 2000);
      });

But! the click event is never fired.

So I wonder, is there a way to add the button a different way? (parameters through a kendo function - i did not find that in the documentation)

..or maybe restructure the click event catcher (maybe clicking this button has some stoppropagation function given by kendo)?

Any help appreciated!
Plamen
Telerik team
 answered on 02 Mar 2015
6 answers
2.3K+ views
<div id="toolbar"></div>

<script>
$("#toolbar").kendoToolBar({
items: [
{ type: "button", text: "foo", imageUrl: "foo.png" },
{ type: "button", text: "bar", imageUrl: "bar.png" },
{ type: "button", text: "baz", imageUrl: "baz.png" }
]
});
</script>

In the above example, I would like to 
1. Change the image of foo button to the right but keep the image of bar and baz button to the left
2. Float bar and baz button to right but foo button to left

Thanks so much for your help.



Petyo
Telerik team
 answered on 02 Mar 2015
2 answers
349 views

Hello all,

I have been looking for a solution to allow user inserting a variable name into the editor (once submitted the value is searched into a hash-map and replaced on server side)
For this I wanted to forbid the user to edit the value (to avoid him involuntary edition).

The solution I found is to insert a span with "contenteditable='false' " attribute :

editor.exec("inserthtml", { value: " <span contenteditable='false'>+myValue+</span>" });

At a point this work well. The value cannot be changed and all the content is deleted at once.

But I face 2 issues with this solution :

1. If I put the cursor just before the snippet and I press enter, the snippet jump to the next line but the editor looses focus ( On chrome 39.0.2171.95 )
2. After that its impossible to put back the snippet on the previous line :
      On chrome (39.0.2171.95) it delete the snippet when I hit backspace with the cursor before the snippet
      On Firefox (33.1) it does nothing when I hit backspace.

There is a small code example : http://jsfiddle.net/7kk3vgsy/1/

Thanks

Nicolas
Top achievements
Rank 1
 answered on 02 Mar 2015
1 answer
156 views
Hi,

I am using an endless scrolling list view in my app. Recently added the ability to scroll to the top of the page, but the performance is really bad. Most of the time I simply get a blank page and I have to scroll up and down to see anything. It can be easily reproduced in your demo:
http://dojo.telerik.com/OqEGI  (original - http://demos.telerik.com/kendo-ui/mobile-listview/endless-scrolling#/)

Just change the header to this:    <span data-role="view-title" onClick="app.view().scroller.scrollTo(0, 0);"></span> 
How can I workaround this bug?
Petyo
Telerik team
 answered on 02 Mar 2015
5 answers
196 views
Hi.
Hoping you can help.

I have been using your demo at
http://demos.telerik.com/kendo-ui/mobile-listview/hierarchical-databinding#hierarchical-view?parent=2  in order to learn how to bind to hierarchical data.

In my data, (outline structure below), you'll see that the elements with children are called 'ChildNodes'

How do I build the list, as per your example, so that the ChildNode elements appear ready to load in their data?

Tree struct:
--Root level
----ChildNodes
----Active (bool)
----num (int)
--------Active (bool)
--------ChildNodes
------------Active (bool)
------------num (int)
----------------ChildNodes
--------------------Active (bool)
--------------------num (int)
------------------------Active (bool)
------------------------ChildNodes: []
--------------------Completed: int
------------------------Description: string
------------------------ElapsedSeconds: int
------------------------Guid: string
------------------------Id: int
------------------------NodeType: int
------------------------ParentId: int
------------------------PersonId: int
------------------------Project: string
------------------------ProjectId: int
------------------------State: string
------------------------WorkItemType: string
--------------------...
--Completed: int
--Description: string
--ElapsedSeconds: int
--Guid: string
--Id: int
--NodeType: int
--ParentId: int
--PersonId: int
--Project: string
--ProjectId: int
--State: string
--WorkItemType: string

Many thanks in advance.

Petyo
Telerik team
 answered on 02 Mar 2015
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
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?