Telerik Forums
Kendo UI for jQuery Forum
8 answers
1.8K+ views

I am trying to build grids using Kendo - Angular2. I am generating the grid completely dynamically from the Json data. I want to apply styling to few columns based on the column name. By using the below code, I am able to generate the grid, but couldn't able to apply styling to few columns based on the column name. 

 

<kendo-grid [kendoGridBinding]="gridData" [pageSize]="10" [pageable]="true" [sortable]="true" [groupable]="true" [height]="370">
<kendo-grid-column *ngFor="let col of columns" field="{{col.Name}}" title="col.Name" [sortable]="true">
</kendo-grid-column>
</kendo-grid>

 

My Json structure. 

 

{
    "Id": "ALFKI",
    "CompanyName": "Alfreds Futterkiste",
    "ContactName": "Maria Anders",
    "ContactTitle": "Sales Representative",
    "Address": "Obere Str. 57",
    "City": "Berlin",
    "PostalCode": "12209",
    "Country": "Germany",
    "Phone": "030-0074321",
    "Fax": "030-0076545"
}

Dimiter Topalov
Telerik team
 answered on 30 Mar 2017
3 answers
816 views

So when I load the treelist initially it appears fine.  Due to user input I need to clear the treelist and redraw with new data.  My second transport read is happening properly yet my treelist shows completely empty.  It appears that the treelist is not happy with redrawing after everything is databound.

I call treelistoptions.dataSource.read() and I see it enter transport.read and read successfully then calling options.success(mydata); yet I see no data.  When I destroy my control and re-enter it then appears fine.

 I have tried passing the collection to treelistoptions.dataSource.data(mydata) and have had no luck with that either.

Thanks

-Craig

Stefan
Telerik team
 answered on 30 Mar 2017
5 answers
475 views

I'm having some trouble getting my nested listviews to sort properly. I have a parent list view that can have 1+ child listviews. I want to be able to sort each listview individually, eg. be able to sort all of the children inside of their parent.

Here is what I currently have for the parent listview and then all of the child of it:

$("#baSurveyGroupTemplateListView").kendoSortable({
    handler: ".handle",
    connectWith: ".childBaSurveyGroupTemplate",
    filter: "> .baSurveyGroupPanel",
    axis: "y",
    cursor: "move",
    hint: function (element) {
        return element.clone().addClass("hint");
    }
    placeHolder: function (element) {
        return element.clone().addClass("policy-section-panel-placeholder").text("Drop Here!");
    },
    change: function (e) {
        alert(e.oldIndex);
        alert(e.newIndex);
    },
    ignore: ".childBaSurveyGroupTemplate >.baSurveyGroupPanel",
    autoScroll: true
});
$(".childBaSurveyGroupTemplate").kendoSortable({
    handler: ".test-handle",
    connectWith: "#baSurveyGroupTemplateListView",
    filter: "> .baSurveyGroupPanel",
    axis: "y",
    cursor: "move",
    hint: function(element) {
        return element.clone().addClass("hint");
    },
    placeholder: function(element) {
        return element.clone().addClass("policy-section-panel-placeholder").text("Drop Here!");
    },
    autoScroll: true
});

 

Here is a simple breakdown of the HTML structure with a Parent ListView followed by two child listviews:

<div id="baSurveyGroupTemplateListView">
    <div class="panel panel-default baSurveyGroupPanel">
        <div class="panel-heading">
            <h4 class="panel-title">Title</h4>
        </div>
        <div class="panel-body">
            <div class="childBaSurveyGroupTemplate">
                <div class="panel panel-default baSurveyGroupPanel">
                    <div class="panel-heading">
                        <h4 class="panel-title">Title</h4>
                    </div>
                </div>
                <div class="panel panel-default baSurveyGroupPanel">
                    <div class="panel-heading">
                        <h4 class="panel-title">Title</h4>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="panel panel-default baSurveyGroupPanel">
        <div class="panel-heading">
            <h4 class="panel-title">Title</h4>
        </div>
        <div class="panel-body">
            <div class="childBaSurveyGroupTemplate">
                <div class="panel panel-default baSurveyGroupPanel">
                    <div class="panel-heading">
                        <h4 class="panel-title">Title</h4>
                    </div>
                </div>
                <div class="panel panel-default baSurveyGroupPanel">
                    <div class="panel-heading">
                        <h4 class="panel-title">Title</h4>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

 

So my goal here is to be able to sort each child within its parent. With the current JavaScript I am able to successfully sort the child panels of the #baSurveyGroupTemplateListView but when I try and sort the child panels of the .childBaSurveyGroupTemplate ListViews it ends up just moving the parent ListView.

I thought by telling the #baSurveyGroupTemplateListView to ignore ".childBaSurveyGroupTemplate >.baSurveyGroupPanel" and to filter "> .baSurveyGroupPanel" that I would be able to sort the children separately but that doesn't seem to be the case here.

 

Stefan
Telerik team
 answered on 30 Mar 2017
1 answer
161 views

Hi team,

 

Please update french localization for kendo.messages.fr-xx.js of the 2 items below :

 

"headerStatusUploaded": "Done",  --> my suggestion : "Terminé"
"headerStatusUploading": "Uploading..."--> my suggestion : "Téléchargement..."

 

Best regards.

Nencho
Telerik team
 answered on 30 Mar 2017
1 answer
237 views

We are using this control in timeline mode in one of our products and with growing number of resources and events the control became really slow in rendering (initially and after any navigation). As in an example below, it behaves as described even without events, just with 500 rows of resources:

http://dojo.telerik.com/IxAwe/3.

We are looking forward to any advice how to improve user experience with such amount of data (we can't always filter resources or events just because we have to show all perspective in most common view).

Ivan Danchev
Telerik team
 answered on 30 Mar 2017
2 answers
216 views

I have a dojo with a toolbar set up pretty nicely here:

http://dojo.telerik.com/iKigI/2

What we want to do is have multiple overflows.  So, for example, the first section would overflow into a section called File.  The second section would collapse into a section called Edit.  The third into a section called View.  Etc.  I attempted to make this work by putting toolbars within the toolbar but the overflow doesn't seem to work when it's put together this way

Here's the dojo I put together attempting this:

http://dojo.telerik.com/aBAPi/10

Larissa
Top achievements
Rank 1
 answered on 29 Mar 2017
4 answers
311 views

Hi Team,

 

I am facing issues with visualizing a kendotree after updating the kendo ui to the latest Kendo UI v2017.1.223 from 2012 version.

Input:

<ul class="tree-level-1" xmlns="">
<li class="">
<span class="leaf packageType">Digital Studio Images</span>
<span class="frequency">( 18 )</span>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Allure</span>
<span class="frequency">( 1 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">AL Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Bon Appetit</span>
<span class="frequency">( 2 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">BA Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">BA Web Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Cargo</span>
<span class="frequency">( 1 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">Cargo Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Glamour</span>
<span class="frequency">( 2 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">GL Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">GL Digital Studio 2007</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Golf</span>
<span class="frequency">( 2 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">GW Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">Golf Digest Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Gourmet</span>
<span class="frequency">( 2 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">Gourmet Book Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">Gourmet Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Teen Vogue</span>
<span class="frequency">( 7 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">TV DS 201302</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">TV DS 201308</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">TV DS Web 2013 B</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">TV Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">TV Digital Studio 2014</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">TV Digital Studio 2015</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">Teen Vogue Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
<ul class="tree-level-2">
<li class="">
<span class="leaf brand">Vogue</span>
<span class="frequency">( 1 )</span>
<ul class="tree-level-3">
<li class="final">
<span class="leaf packageName">Vogue Digital Studio</span>
<span class="frequency">( 1 )</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>

 

Script:

// Enable browse tree
    $("#treeView").kendoTreeView({
        select: function(e) {
            var treeview = $("#treeView").data("kendoTreeView");
            var node = e.node;
            treeview.expand(node);
        }
    });

 

Only the first node second level node expands. On investigating the treeview HTML generated in the source, i see the <data-uid> attribute property not forming for the second level data except for Digital Studio Images--> Allure--> AL Digital Studio(this alone expands).

 

Also, there is an error thrown in the background:

Uncaught TypeError: Cannot read property 'uid' of undefined
    at init._syncHtmlAndDataSource (http://digitalarchivedev.condenast.com/resources/js/kendo.all.min.js:64:30695)
    at init._syncHtmlAndDataSource (http://digitalarchivedev.condenast.com/resources/js/kendo.all.min.js:64:30878)
    at init._syncHtmlAndDataSource (http://digitalarchivedev.condenast.com/resources/js/kendo.all.min.js:64:30878)
    at new init (http://digitalarchivedev.condenast.com/resources/js/kendo.all.min.js:64:29252)
    at HTMLUListElement.<anonymous> (http://digitalarchivedev.condenast.com/resources/js/kendo.all.min.js:26:4368)
    at Function.each (http://digitalarchivedev.condenast.com/resources/js/jquery-1.12.3.min.js:2:2881)
    at a.fn.init.each (http://digitalarchivedev.condenast.com/resources/js/jquery-1.12.3.min.js:2:846)
    at a.fn.init.e.fn.(anonymous function) [as kendoTreeView] (http://digitalarchivedev.condenast.com/resources/js/kendo.all.min.js:26:4345)
    at HTMLDocument.<anonymous> (http://digitalarchivedev.condenast.com/resources/scripts/packageManager.js:36:20)
    at i (http://digitalarchivedev.condenast.com/resources/js/jquery-1.12.3.min.js:2:27449)

 

Appreciating your help on why the second level tree elements are not expanding due to the above error. If data-uid property missing is the problem, why it is not getting formed? 

Bharathi
Top achievements
Rank 1
 answered on 29 Mar 2017
2 answers
1.5K+ views

I have code running in my dataBinding event for my scheduler that only runs if it is a 'rebind' event. However, there is a place in my code where I want that code to run, so doing something like:

scheduler.trigger('dataBinding') triggers the dataBinding event... but doesn't give it an action, like 'rebind', which I need it to have to run that code.

 

Is there a way to trigger a rebind dataBinding event manually in my javascript?

Tyler
Top achievements
Rank 1
 answered on 29 Mar 2017
0 answers
103 views

 Hello there,

I have used Table of Content in ReportBook and its working perfectly but my problem is I want to display TOC page at 3rd possition of ReportBook.
As we have to add that TOC contained page as TocReportSource to add into ReportBook and its adding that page at first index automatically.
Kidnly please help me out with this.

 

 

Is there any way to add sub heading TOC?

 

Thanks,

 

 

 

Nikin
Top achievements
Rank 1
 asked on 29 Mar 2017
3 answers
382 views

when i try to add a new record to my kendo grid. i am getting an error that "Uncaught TypeError: $(...).kendoDropDownList is not a function"

Please find below list of Js file i have refereed 

<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery-ui-1.11.2.js"></script>
<script src="~/Scripts/kendo.all.min.js"></script>
<script src="~/Scripts/kendo.dropdownlist.min.js"></script>
<script src="~/Scripts/kendo.aspnetmvc.min.js"></script>

..ETC.

Tsvetina
Telerik team
 answered on 29 Mar 2017
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?