Telerik Forums
Kendo UI for jQuery Forum
3 answers
215 views
Does anyone know of a way to configure file upload to only select directories and force the upload of every file in that directory?
Petur Subev
Telerik team
 answered on 05 Feb 2013
5 answers
359 views
Affected browsers (and perhaps more): IE9 on Windows 7, IE10 preview on Windows 7.

Do this:
  1. You have a Kendo UI Editor on a page.
  2. You add an additional editor on the same page.
  3. Destroy the new editor.
  4. You add an additional editor on the same page.
  5. You try to write something in one of the editors in the page.
Expected result:
You can write stuff.

Actual result:
You cannot write stuff, as the text area in the editor cannot receive focus.

I have attached files reproducing the bug. Open the HTML document. Simply press the ADD button, the REMOVE button and the ADD button again to see the bug. Remember to use IE - it works fine in Chrome.
Dimo
Telerik team
 answered on 05 Feb 2013
1 answer
149 views
Hello - I have an html file (some.html) that has some controls, one of which is a span (which I would like to render as a kendoMobileButton. I also have a JS file where I get the contents of some.html using an ajax call and append it to the body. For the purpose of this question, I am oversimplifying the code.

some.html:
...
<div id="somediv">
<span id="thisbutton"  data-bind="click: click" style="background-color:green;">A Button</span> 
</div>

JS:

$.ajax({
        url: "html/mobileapp/preflight/some.html",
        type: "GET",
        success: function(data) {
            this.container.append(data);
            bindView();
        },
        context:this,
        error : function(xhr, textStatus, errorThrown ) {
            
        },
        timeout: 30000
});

In the bindView(), I create a viewModel and bind it to the view, as below:


viewModel = kendo.observable({
        locations:  this.dataSource.data(),
        click: function(e) {
        console.log("****click");
        }
    });

kendo.bind($("#somediv"), viewModel);
$("#thisbutton").kendoMobileButton();


(Note that the above code happens *after* kendoApp has been created (hence the reason I would like to call kendoMobileButton() to render the span as a kendo mobile button:

kendoApp = new kendo.mobile.Application(document.body, { });

What I observe when I run the app on the device is that the span is correctly rendered as a button, *but* the click method doesn't get called consistently. It fires a few times, and then on subsequent clicks, nothing happens - I don't see the console.log("****click") output.


Now if I comment out this line:

//$("#thisbutton").kendoMobileButton();

then the span remains a span (instead of button) but the click event fires correctly everytime I click the span.

Any idea what could be going on?

Thanks,
Alexander Valchev
Telerik team
 answered on 05 Feb 2013
2 answers
304 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
208 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
188 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
752 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
50 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
90 views
hi.

  kendoui doesn't include a toolbar control?

 thanks!
Sebastian
Telerik team
 answered on 05 Feb 2013
1 answer
104 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
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
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?