Telerik Forums
Kendo UI for jQuery Forum
0 answers
1.1K+ views
The Kendo UI Team has identified a problem with the Popup in Firefox, which affects all Kendo UI Widgets that use it. The issue only manifests itself when the page is scrolled as inability to open the Popup there.

We have identified the root cause of the problem and all following releases, including internal builds, will be free of this defect.

The corrected minified Popup script is also available for download as attachment to this post. You can load it right after the combined scripts in order to avoid the issue.

There is an easy alternative fix with CSS only. Force your desired overflow on the document element, like this:
.k-ff {
    overflow: inherit !important;
}


The selector above will affect only Firefox. Adjust the overflow to your needs (visible, auto, hidden, scroll, inherit).
Kendo UI
Top achievements
Rank 1
 asked on 20 Mar 2014
5 answers
240 views
I am working on creating a new application using the Kendo SPA framework.  One must-have feature is the ability to cancel navigation to a route, for example - don't allow the user to navigate away if the current has unsaved changes.

According to the documentation, this should be as simple as calling e.preventDefault() in the router's change event.  And this does work in the simplest scenario - if you wire up the change event and call preventDefault, the route will be cancelled, you stay on the current view, and the url is reverted back to it's original value.

However, I feel that is overly simplistic.  In reality, you would never simply just cancel the route.  You need to make a call to see if there are unsaved changes so that you can determine whether or not the navigation is allowed.  And this is where my problem lies.

In my scenario, I have a callback that is executed in the router change event that checks to see if the navigation is allowed.  If I hit a route that I cannot leave, then I call e.preventDefault and the view does not change (which is good), but the route does not revert back to the original value (which is bad).  So now the wrong url is showing in the browser.  What's worse is that if I now attempt to navigate to a different route, this will cause an infinite loop where the change event keeps firing and being cancelled, which locks up the browser.

I have created an example in JS Bin that demonstrates this behavior - http://jsbin.com/EXARiTiJ/10.  Here are the steps to recreate the issue:
  1.  When the page loads, it will first navigate to the Home view
  2.  Click on "Orders" to navigate to the Orders view.  This will navigate correctly and update the url appropriately.
  3.  Click "Products" to navigate to the Products view.  Again, this will navigate correctly and update the url.
  4.  Click "Orders" to navigate back to the Orders view.  The code in the change event will call preventDefault and this will trigger the error condition. The Products view will remain visible, but the url now shows "/orders" - however, it should still show "/products".
  5.  Now click "Home" to try to navigate to the Home view.  Be warned though, this will now create an infinite loop and lock up the browser.

It seems like this is a bug with the router, but maybe I am missing something.  Is there a different way that I should be handling canceling the route navigation?  If this is a bug, I would like to know if there is a workaround/fix that can be implemented, since this feature is a must-have for my application. 

Sean
Top achievements
Rank 1
 answered on 20 Mar 2014
3 answers
310 views
hello,
i'm using cache inmemory and i want to customise server filtering, so taht i will populate grid with remote data on specific number of page.
for example on each 10 page.
Petur Subev
Telerik team
 answered on 20 Mar 2014
1 answer
281 views
I currently have the following extended MutliDayView I'm using to hide/show days of the week. The days to show are selected from checkboxes on the page.

var customView = kendo.ui.MultiDayView.extend({
    name: "customview",
    calculateDateRange: function () {
        var startDate = this.options.date;
        var date = startDate.getDate();
        var day = startDate.getDay();
 
        var weekStart = new Date(startDate.setDate(date - day));
        var weekDate = weekStart.getDate();
 
        // Array to hold the dates that are displayed
        var dates = new Array();
 
        // Array to hold all the days of the week
        var weekDays = new Array();
        for (var i = 0; i < 7; i++)
        {
            weekDays[i] = new Date(weekStart.setDate(weekDate + i));
        }
 
        // Get Selected Days to show from  checkboxes
        var checkboxes = document.getElementsByName('weekday');
        for (var i = 0; i < checkboxes.length; i++)
        {
            // Only add days checked
            if (checkboxes[i].checked)
            {
                // DOW
                var dayNumber = parseInt(checkboxes[i].value);
                dates.push(weekDays[dayNumber]);
            }
        }
        this._render(dates);
    }
});

I have subscribed to the onClick event for checkboxes. I want to add or remove dates from the view. Here is the code
function weekDayClick(cb)
{
    // Get current view
    var scheduler = $("#scheduler").data("kendoScheduler");
    var currentView = scheduler.view();
 
    // If the current view is not "My View", we can just return
    if (currentView.title.toLowerCase() != "my view")
        return;
 
        // Is My View. If Checked, need to add to view; otherwise remove
    var dates = currentView._dates;
    var newDates = new Array();
    var dow = parseInt(cb.value);
 
    if (cb.checked)
    {
        // TODO: Add selected day to dates
    } else
    {
        // Remove date from view
        for (var i = 0; i < dates.length; i++)
        {
            if (dates[i].getDay() != dow)
                newDates.push(dates[i]);
        }
    }
 
    // Render view
    currentView.render(newDates);
    scheduler.view(scheduler.view(customView));
    scheduler.view(scheduler.view().name);
}

However, I cannot get this to work. The only way I can get it to work is change the view from my custom view to another one, make the checkbox changes and then select the custom view again. I have to comment out the event code when using this workaround.

Any suggestions?

Randy
Top achievements
Rank 1
 answered on 20 Mar 2014
1 answer
1.2K+ views
How do I access "DATA-" attributes in a option after converting the select to a kendo dropdownlist?

Here is an example of my select:
<select id='connect-search-results'>
<option data-text='Text-One' data-id='Data-One' data-url='\\One'>One</option>
<option data-text='Text-Two' data-id='Data-Two' data-url='\\Two'>Two</option>
</select>

I was using:
   var $option = $('#connect-search-results option:selected');
     
   if ($option.length > 0) {
      var id = $option.data('id');
      var url = $option.data('url');
      var text = $option.data('text');  
      ...
   }

but now that I've converted the select to a dropdownlist, the jquery calls are failing to return the data.
Georgi Krustev
Telerik team
 answered on 20 Mar 2014
1 answer
1.4K+ views
I need to change the available options in a dropdownlist based on what i user has entered into a textbox on the same page.  My thought was to attache to the change event on that textbox and rebind/read the kendo dropdown list.

When the page first loads everything works as expected.

When the user changes the MaxSize textbox the rebindRooms function get called and processed completely, but the GetSize function never gets called and the no ajax requests get fired.

How to I force the dropdown to rebind from the server?

.cshtml
textbox
@Html.DisplayFor(m => m.MaxSize)

dropdownlist
@(Html.Kendo().DropDownListFor(m => m.SchedulePreference.DesiredRoomId)
                .DataTextField("Value").DataValueField("Key")
                .DataSource(ds => ds.Read(read => read.Action("RoomDropDown_Read", "Scheduling")
                                    .Data("GetSize"))
                                    .ServerFiltering(true)
                            )
                            )

.js
<script type="text/javascript">
    $(document).ready(function () {
        $('#MaxSize').change(rebindRooms);
    });
</script>

function rebindRooms(e) {
    var el = e.currentTarget.value;
    var ddl = $("#SchedulePreference_DesiredRoomId").data("kendoComboBox");
    if (ddl && ddl.dataSource) {
        ddl.dataSource.read();
    }
}

function GetSize() {
    var el = $('#MaxSize');
    var s = el ? el.val() : 0;
    return {
        size: s
    }
}


.cs
[NoCache]
public ActionResult RoomDropDown_Read(int size=0)
{
    var list = _uow.RoomRepository.GetAll().OrderBy(o => o.DropDownText).Where(w => w.MaxSize >= size).Select(s=>new KeyValuePair<int,string>(s.Id,s.DropDownText)).ToList();
 
    return Json(list, JsonRequestBehavior.AllowGet);
}

Thanks!
-Logan
Georgi Krustev
Telerik team
 answered on 20 Mar 2014
1 answer
134 views
Hi,

Please can someone help me.  I'm trying to populate a bar chart from the code behinddata in a web forms environment.  I've serialized the data to json and put into a hidden field.  Then trying to set that as the datasource but the report keeps coming up blank.  What's wrong?

hdn1.value = JsonArray()    End Sub
    Public Class Sales
        Public Property name As String        Public Property data As String   
    End Class   
    Protected Function JsonArray() As String
        Dim myArray As String
        Dim obj As New Sales With {.name = "Sales", .data = "8067.96, 8099.93, 9175, 8874, 8478"}
        Dim obj2 As New Sales With {.name = "Costs", .data = "8067.96, 8099.93, 9175, 8874, 8478"}       
        Dim objSales As New List(Of Sales)() From {obj, obj2}
        Dim objSerializer As New JavaScriptSerializer()
        myArray = objSerializer.Serialize(objSales)
        Return myArray
    End Function


jQuery(document).ready(function ($) {
            var myTheme = 'blueopal';
            var myds = $('#MainContent_hdn1').val();
            alert(myds);
          
            $("#chart").kendoChart({
                datasource: {
                        data: myds
                },                series: [{
                    field: "data"
                }],
                                               //seriesDefaults: { type: "verticalBullet" },
                chartArea: {
                    height: 250                  
                },
                theme: myTheme,
                tooltip: {
                    visible: true,
                    template: "#= series.name #: #= value #"
                }
            });
Iliana Dyankova
Telerik team
 answered on 20 Mar 2014
2 answers
278 views
Hello,

I would like to insert a dropdownlist inside a grid column(not using edit mode) by converting the widget to a client side template. The template works and outputs a simple input, but the script that initializes the dropdown is not ran. 

I am obtaining the client side template using this:
var ruleSetDropDown = Html.Kendo().DropDownList()
                .Name("RuleSets_#=Id#")
                .BindTo(Model.RuleSets)
                .DataTextField("Name")
                .DataValueField("Id")
                .ToHtmlString();

And then apply it to the AJAX bound grid like this:
column.Template(t => t)
             .ClientTemplate(ruleSetDropDown.ToString())
             .Title("")

If i try to render it inside the toolbar(with a different name of course) it works fine:
.ToolBar(t =>
            {
                t.Template(ruleSetDropDown);
            })


But the same technique seems not to be working with row templates.
How can i achieve this?
Dimiter Madjarov
Telerik team
 answered on 20 Mar 2014
34 answers
532 views
kendo: kendoui.complete.2013.2.1021.commercial
phone gap: 3.10 also tried with 2.7.0 and got same result

It works well with any ios version before ios 7. With ios7 the keyboard hides the input fields.

After investigation I suspect it is related to the position css attribute of kendo

Attached images showing the correct behavior in ios6 and the wrong one in ios7
Kiril Nikolov
Telerik team
 answered on 20 Mar 2014
1 answer
418 views
Hi

I'm using both .net and js version of the kendo grid, .net version is translated fine because of the mvc.dll translation file. Is it any easy way to translate the text
"posts per page" and "x of y items" in the kendo grid pager toolbar for the js version to?

Thanks in advance for any reply
//Dan
Sebastian
Telerik team
 answered on 20 Mar 2014
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?