Telerik Forums
Kendo UI for jQuery Forum
2 answers
270 views
I am going to be displaying data in "pivoted" mode in the grid, and the TH data-field will contain an id from the database; for example:

Date..............Mary...............Fred...............Mike  
1/1/2013........17.....................19...................22

for "Mike" col-header it might be data-field="145998452".

Is there any built-in function in the Kendo library that returns the TH data-field for the column of a clicked-on cell, taking into account hidden columns to the left? If there are invisible columns to the left of the clicked-on cell,  the index/cellindex are off by the invisible columns count (to the left of the clicked cell). 

EDIT: This is a byproduct of the Kendo design that puts the header and the table-body each into separate tables, and the table-body-table doesn't contain the columns if they're marked hidden (display:none) in the header-table.   Kendo header-table has style="display:none" when the grid column's configuration has hidden:true

<th role="columnheader" data-field="eeid" style="display: none;" class="k-header" data-role="sortable"><a class="k-link" href="#" style="">eeid</a></th>



  $(grid.tbody).on('click',"> tr:not(.k-grouping-row, .k-detail-row, .k-group-footer)", function(e){
var cell =  e.target;
 
    var dataInfo = $('thead th').eq(e.target.cellIndex).data('field');
        var ix = $(cell).index(),
         thData = $('thead th').eq(ix).attr('data-field');
Dimo
Telerik team
 answered on 05 Feb 2013
1 answer
180 views
I have 4 in TabStrip, When a tab is activated, I want to zoom the icon of the Tab. 

<footer data-role="footer">
        <div data-role="tabstrip" data-id="tabStrip">
            <a href="#home" id="x" data-icon="home">Home</a>
            <a href="#xxx" id="a" data-icon="login">Login</a>
    <a href="#xxx" id="b" data-icon="login">xxxx</a>
            <a href="#xxx" id="c" data-icon="login">xxx</a>
        </div>
 </footer>

var tabStrip = $("#tabStrip").data("kendoMobileTabStrip");

tabStrip.currentItem();// returns undefined for me.
 And is there possibility to scroll the TabStrip?
Kamen Bundev
Telerik team
 answered on 05 Feb 2013
3 answers
141 views
I have noticed an error related to column re-sizing when using remote virtualization. During re-size I am noticing a gap appearing in the grid (see screen shot). I have also attached a sample project.
I initially thought this was due to hidden columns in the grid, but it appears to be related to scroll with remote virtualization.
The issue goes away if I disable the remote scroll/virtualization...

Browser: IE 8.0

Thanks
Tor
Alexander Valchev
Telerik team
 answered on 05 Feb 2013
4 answers
674 views
I've been struggling to find a better way to filter an ObservableArray to a subset of values.  At first glance it seems like this should be easy.  Simply add a function to the view model to create an array with only those items I want and then set the binding source to that function.

Here's an example:

<ul class="items" data-template="row-template" data-bind="source: itemsFiltered"></ul>

 itemsFiltered : function () {
       var iFlt = [];
       var iCurr = this.get("Items");
       for (var i = 0; i < iCurr.length; i++) {
           if (iCurr[i].get("State") != "CA") { //Ex: filter out all items in CA
               iFlt.push(iCurr[i]);
           }
       }
       return iFlt;
   }

This sort of works, but I'm getting some strange Focus and Blur behaviors in IE when binding to the Filter function.  These behaviors go away if I bind directly to the array.

I can't help but think that IE doesn't like the fact that I'm replacing the entire array each time the view model changes.  I know KnockOut has a utility function to handle filtering like this (ko.utils.arrayFilter), and such a function is more ideal than returning a new array.

Does Kendo MVVM contain an equivalent to ko.utils.arrayFilter?  If so, what is it?  If not, I'd like to recommend adding such a function.  Ideally the binding features of kendo should call always call a filter function (default implementation would return a value of true) when evaluating the binding of each item.

Is there another way to accomplish filtering in kendo MVVM?  I know I could theoretically add an binding for invisible and point to a function that evaluates whether or not to display the item, but this is only a partial solution as the item itself would still be in the DOM.
Alex Gyoshev
Telerik team
 answered on 05 Feb 2013
1 answer
35 views
In v2012.3.1401's kendo.window.js line 795. Should be using $ instead of global `jQuery`
Alex Gyoshev
Telerik team
 answered on 05 Feb 2013
1 answer
65 views
hi.

  kendoui doesn't include a toolbar control?

 thanks!
Sebastian
Telerik team
 answered on 05 Feb 2013
1 answer
84 views
I am looking for a way to structure textual content within a cell (e.g. <li> bullets or <p> or <div> or <br>).  

This would be one cell:
Monday Menu
Breakfast: eggs&bacon
Lunch: bean&bacon soup
Dinner:bacon-barded duck


The following is just one idea. Maybe there is a better way:

Assuming the fields:

          MondayBreakfast,MondayLunch,MondayDinner, TuesdayBreakfast, TuesdayLunch, TuesdayDinner ... etcetera

is this a legal cell template?

                               
                    <td>   <div>${MondayBreakfast}</div><div>${MondayLunch}</div><div>${MondayDinner}</div>     </td>                       
                   <td>   <div>${TuesdayBreakfast}</div><div>${TuesdayLunch}</div><div>${TuesdayDinner}</div>  </td>  

If yes, how would the columns attributes (title literal, sortable, groupable, etc) be defined in the grid configuration?
.
,schema: {
                model: {
                    fields: {
                        MondayBreakfast: { type: "string" },
                        MondayLunch: { type: "string" },
                        MondayDinner: { type: "string" },
                       TuesdayBreakfast: { type: "string" },
                       TuesdayLunch: { type: "string" },
                        TuesdayDinner: { type: "string" },
                       WednesdayBreakfast: { type: "string" },
                       WednesdayLunch: { type: "string" }
                         etc etc
                    }
                }
            }
        },
 columns: [
    { field: ??  , groupable: false, sortable: false, title: "Monday Menu", width: 150 },
    { field: ?? , groupable: false, sortable: false, title: "Tuesday Menu", width: 150 },
   
]
.
.
.
Rosen
Telerik team
 answered on 05 Feb 2013
1 answer
51 views
Is this a panel?
Is there any sample exists which related to this?

Thanks in advance
Alexander Valchev
Telerik team
 answered on 05 Feb 2013
1 answer
165 views
Hi. when I use the newest v2012.3.1315's splitter (kendo.web.min.js) in ie9's compatibility view, the ie9 become very slow when I just mouse mouse on the page. it's ok in  ie9's normal view and chrome.
when I replace it whith the v2012.3.1114's splitter(kendo.web.min.js), then all it'is ok.
So the newest v2012.3.1315 kendoui maybe has Serious performance problems.
Thanks!




Kendo 
Alex Gyoshev
Telerik team
 answered on 05 Feb 2013
1 answer
306 views
Hello - This question is regarding the usage of kendo.init() method in a mobile app. I am trying to inject some kendo ui markup using an ajax call, *after* the kendo app has been instantiated. For brevity's sake, I am showing some oversimplified code, see below:

<div id="container" data-role="content">
<ul data-role="listview" id="mylist">
<li> item 1 </li>
<li> item 2 </li>
<li> item 3  </li>
<li> item 4  </li>
</ul>
</div>    


Once the ajax call has returned and the above code has been appended to the kendo view, I am doing the following:

kendo.init($("#container");

This, however doesn't seem to work - the list looks like an HTML list and not a Kendo listview widget. On the other hand, if I individually initialize the listview widget using $("#mylist").kendoMobileListView(), it works.

Could you provide an explanation to this? 

I am using the init() method as described in the docs (http://docs.kendoui.com/getting-started/data-attribute-initialization). I am also curious to know why the init() method is not in the API reference.

Thanks,
Petyo
Telerik team
 answered on 05 Feb 2013
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?