Telerik Forums
Kendo UI for jQuery Forum
1 answer
402 views
Hi there, I have a treeview that I add some HTML to after the treeview is rendered.  (For example I add a button after the last child item).  I thought about including the button within my template but I have no way of knowing that the current node being rendered is the last child.  The datasource doesn't have that information either.  So I add the buttons dynamically after the tree is rendered.

I have dragAndDrop = true.   So what is happening is that when I drag and drop a node that had a button it is removing my button that I previously added.  I assume that is because it is running the node through the template again?

Here is my nodes HTML - I added a note below in bold that shows the tag that is added dynamically.
<li role="treeitem" class="k-item" data-uid="05d9dd05-11b4-48d1-8824-e8cd5b998eba" aria-selected="false " id="treeview7469_tv_active"><div class="k-top"><span class="k-in k-state-focused">
    <span class="agendaitem-child"><span style="font-size: .9em;">a</span>. <a id="119366">test</a></span>
    <div class="iteminfo" data-order="1" data-id="119366" style="display: none"></div>
</span></div>
\\The edit-controls tag is dynamically added after tree is rendered
<
div class="edit-controls" style="margin-left: .5em; margin-bottom: .2em;"><a href="#" class="action action-left has-icon btnNewSubItem" data-order="1"><span class="inner"><span class="ui-icon ui-icon-plusthick"></span><span class="button-text">Sub-item</span></span></a><a href="#" class="action action-right has-icon btnNewSubItemQuick" data-order="1"><span class="inner"><span class="ui-icon-rabbit"></span><span class="button-text">Q</span></span></a><div class="invisText" style="display: none; padding-left: 0%;"><input type="text" value="" class="field-thin" style="width: 60%;"><a href="#" class="action action-left has-icon btnAddQuickItem"><span class="innerquick"><span class="ui-icon ui-icon-quickadd"></span></span></a><a href="#" class="action action-right has-icon btnCancelQuickItem" data-order="1"><span class="innerquick"><span class="ui-icon ui-icon-x"></span></span></a><span class="validate" style="width: 100%; display: block;"></span></div></div></li>

I need to re-add that code after I drop the node because it gets removed.  It appears it can't be done in the "drop" event because it is remove AFTER the drop event is finished.

I tested this by looking at the HTML in the drop event:
function onDrop(e) {
            if (e.dropPosition === 'over') {
                console.log("Drag", e.sourceNode, "over", e.destinationNode);
                console.log("SourceNode", e.sourceNode);
            }
        }
Are there any events for "DropEnd" or "Dropped" that happen after the action is completed?

Thanks for your help!

Coty


Coty
Top achievements
Rank 1
 answered on 27 Feb 2015
1 answer
354 views
Hi,
I am trying to create an event to the click of an item from the kendomenu (see bold part in example).
I'm quite new to this and am using a datasource. Is this possible?

window.onload = () => {
$(document).ready(function () {
//Main Ribbonbar Menu
$("#RibbonMenu").kendoMenu(
{
        
dataSource: [
{
text: "Main", imageUrl: "icons/flight.png",
items: [
{
text: "Flights", encoded: false, imageUrl: "icons/flight.png",
items: [
{
text: "Operation Flights", imageUrl: "icons/flight.png", select: function (e) { alert('e');} },
{ text: "Flights", imageUrl: "icons/flight.png" },
{ text: "Timetable Flights", imageUrl: "icons/flight.png" }
]
},
{
Plamen
Telerik team
 answered on 27 Feb 2015
1 answer
93 views
Chose which css element to control the time dropdown list width?

Please see the image attached, the time dropdown list width is very narrow, I need to know which css element to tontrol it.

yours,
Ivan
Iliana Dyankova
Telerik team
 answered on 27 Feb 2015
5 answers
246 views
Is there a way to set hoverDelay only for the menu closing? Or conversely to remove the hoverDelay on open? We'd like a longer hoverDelay for closing the menu, but not delay opening any further.
Plamen
Telerik team
 answered on 27 Feb 2015
1 answer
66 views
Hi! I've made a custom button to replace the 'Delete' ('destroy') button in an inline editing grid - How do I delete the data with this button in a specific field?:

01.{ command: [
02.   { name: "edit" },
03.   {
04.       name: "Remove Notes",
05.       click: function(e) {
06.    var tr = $(e.target).closest("tr");
07.    var data = this.dataItem(tr);
08. 
09.    var DelNotes = confirm('You wish to delete this stuff?');
10.    if (DelNotes == true) {
11.        confirm = data.FILE_DESC = 'Some Data Here...';
12.        //How do I delete the contents of the field data.FILE_DESC?
13.    } else {
14.        //No deletions here!
15.    }
16. 
17.       }
18.   }
19. ], title: " ", width: "175px" }],


Thank you!
Alexander Valchev
Telerik team
 answered on 27 Feb 2015
3 answers
149 views
Hello, 

I have come across an issue where shapes are being removed from the diagram when I choose to cancel the edit dialog. The issue seems to be tied to the schema of the dataSource. If I provide a mapping for the 'id' of elements in the dataSource using the cancel button on the edit dialog causes the shape and element to be removed: http://dojo.telerik.com/osOmA/7 

If this mapping is removed then the shapes function as expected.

Thanks
Daniel
Telerik team
 answered on 27 Feb 2015
4 answers
314 views
Hi,

I have a dropdownlist defined as follows:
<input class="input-width-75"
     data-role="dropdownlist" data-auto-bind="false" name="signature" data-option-label="select signature" data-value-primitive="true"
     data-text-field="name" data-value-field="name" data-bind="source: signatureDatasource, value: signature" required/>

After running the .validate() function, tooltip not showing saying that this is required!  The required attribute is showing on the "hidden" input though in HTML.

Any idea? 
Bilal
Top achievements
Rank 2
 answered on 27 Feb 2015
3 answers
76 views
I'm using the online ThemeBuilder: http://demos.telerik.com/kendo-ui/themebuilder/

I select a design, lets say 'Material Black'. I then choose to start the Kendo UI ThemeBuilder. It has a little think and then lets me pick between web or DataViz. However, a few of the styles have now broken. For example, notifications all have a blue border around them whereas before the border colour was a darker shade of the background colour. The tab strip is another example, the selected tab is now pure white (making the text un-readable). Also drop down list backgrounds have gone white whereas before they were a dark grey.

Is this a known problem? Any workaround?

I'm using latest Chrome (40) on Win 8.1.
Iliana Dyankova
Telerik team
 answered on 27 Feb 2015
1 answer
360 views
Hello

I have a page in which I return about 500+ records and the Grid takes about 15 secs to load. Everything up-to the point where I get data from the DB is really fast (less than a sec), but when the data is returned from the controller "Json(vm.ToDataSourceResult(request))" to the time it takes to render the data is really slow. The grid uses Ajax Binding and has default Grouping by 3 columns, and some sorting (See GridDefaults.PNG). To overcome the slowness I tried using Virtual Scrolling (which is fast as it has virtual paging), but this correctly loads the grouped data for the first loaded page (say 100 records) (See Capture.PNG) but on scrolling, the rest of the pages does not have the sub data (See Capture1.PNG), and is broken. 

Why is the rending this slow (for the first scenario), Can you please let me know if that is the default behavior and if there's something I can implement to make this faster?
Is virtual scrolling supported with Grouping, as this works for the default first load, but on scrolling, it does get data to render, but is broken on expanding the Grouped columns.

Thanks.
Alexander Popov
Telerik team
 answered on 27 Feb 2015
1 answer
318 views
Hi

In following example - http://dojo.telerik.com/IqIYI/5 - I am trying to understand how the data should be saved in my DB (and hence fed to the scheduler).

This is my custom edit template.

    <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>    <div class="k-edit-label">
            <label for="Contact">Contact</label>
        </div>
        <div data-container-for="Contact" class="k-edit-field">
            <select id="Contact" multiple="multiple" name="Contact"
                data-role="multiselect"
                data-bind="value:Contact"
                data-source='[
                    { "text": "Person1", "value": 1 },
                    { "text": "Person2", "value": 2 },
                    { "text": "Person3", "value": 3 }
                ]'
                data-text-field="text"
                data-value-field="value"
                data-value-primitive="true"
                ></select>
        </div> </script>


And my datasource for the only event (seen on the right in the example) is following:

    dataSource: [
        {
          id: 1,
          start: new Date("2013/6/6 08:00 AM"),
          end: new Date("2013/6/6 09:00 AM"),
          title: "Interview",
          contact: "[1, 2]"
        }
      ]

..The start, end date and the title fill the popup properly (when double clicking the "Interview" event on the right to show its contents).
However the Contact field does not fill.
I tried the following to no avail, does anyone have a clue?

    contact: [1,2]
    contact: {1,2}
    contact: [{1,2}]
    contact: [{value:1, value:2}]
Markus
Top achievements
Rank 1
 answered on 27 Feb 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
Drag and Drop
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
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?