Telerik Forums
Kendo UI for jQuery Forum
5 answers
2.7K+ views
So frustrating.

I have a scenario not extremely complicated in which i require items in my drop-down actually be databound before selecting a default item.

So when does this databound event actually run? Inside my databound event handler i am checking the count of items in the dropdownlist and it is ZERO.

I have been trying to track down phantom errors which are a result of either this bug or a misunderstanding of the docs for 2 weeks. Can someone from telerik expand on this? from the telerik api:

dataBound

Fires when the drop-down list has received data from the data source.

Example

$("#dropdownlist").kendoDropDownList({
    dataBound: function(e) {
        // handle event
    }
});

To set after initialization

// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// bind to the close event
dropdownlist.bind("dataBound", function(e) {
    // handle event
});


Have i misread "receive" data to mean received and bound the data? When really it's not databound? If so it would be extremely useful to have an actual databound event for the dropdownlist that was fired AFTER the items have been created.
Georgi Krustev
Telerik team
 answered on 10 Dec 2012
2 answers
69 views
Can anyone out there help me with getting a panel bar working correctly?  No matter what tutorial I try, or sample code I use - I cannot get it to work???

Thanx in Advance,
Chris
Chris
Top achievements
Rank 1
 answered on 10 Dec 2012
1 answer
114 views
I meant ClientTemplate. It won't let me edit the title of this post.

        columns.Bound(t => t.IsOpen)
        .Title("Status")
        .ClientTemplate(
            "# if (#=IsOpen# == 'True') { #" +
            "something" +
            "# } else { #" +
            "something else" +
            "# } #"
        );

Uncaught Error: Invalid template:'<tr data-uid="#=uid#"><td ># if (#=IsOpen# == 'True') { #something# } else { #something else# } #</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<tr data-uid="'+(uid)+'"><td >'; if (;o+='=IsOpen'; == 'True') { ;o+='something'; } else { ;o+='something else'; } ;o+='</td></tr>';}return o;'

        
Atanas Korchev
Telerik team
 answered on 10 Dec 2012
1 answer
91 views
Are the WPF/SL diagramming controls to be brought to HTML/JavaScript?
Sebastian
Telerik team
 answered on 10 Dec 2012
1 answer
155 views
I need to create a scheme where my pages open windows within the iframe contained in KendoWindow.
To establish a modal window I need to create it from within my home, because if you create it within a modal child page to only cover the child page.
I'm having to develop a scheme for windows like a desktop application.
Below is the JavaScript library I wrote to do this for me:


var kendoWindowFactory = new function () {
 
    var __modalKendoWindow;
    var __functionCallback;
 
    this.createKendoWindow = createKendoWindow;
    this.createModalKendoWindow = createModalKendoWindow;
    this.modalReturn = modalReturn;
 
    function createKendoWindow(element) {
 
        var frameId = "___kendoWindow_" + element.id;
 
        var LINK = element.href;
        var TITLE = $(element).attr("data-title");
        var WIDTH = $(element).attr("data-width");
        var HEIGHT = $(element).attr("data-height");
 
        if (!(parseFloat(WIDTH) > 0)) {
            WIDTH = "50%";
        }
 
        if (!(parseFloat(HEIGHT) > 0)) {
            HEIGHT = "50%";
        }
 
        var kendoWindow = document.getElementById(frameId);
 
        if (kendoWindow) {
            $(kendoWindow).data("kendoWindow").toFront();
        }
        else {
            kendoWindow = $("<div />")
                .attr({ id: frameId })
                .appendTo("body");
 
            $(kendoWindow).kendoWindow({
                title: TITLE,
                modal: false,
                width: WIDTH,
                height: HEIGHT,
                content: LINK,
                visible: false,
                deactivate: function () {
                    this.destroy();
                },
            }).data("kendoWindow").center().open();
 
            $(kendoWindow).css({ overflow: "none" });
        }
 
        return false;
    }
 
    function createModalKendoWindow(element, functionCallback) {
 
        var frameId = "___kendoWindowModal_";
 
        __modalKendoWindow = null;
        __functionCallback = functionCallback;
 
        var LINK = element.href;
        var TITLE = $(element).attr("data-title");
        var WIDTH = $(element).attr("data-width");
        var HEIGHT = $(element).attr("data-height");
 
        if (!(parseFloat(WIDTH) > 0)) {
            WIDTH = "770px";
        }
 
        if (!(parseFloat(HEIGHT) > 0)) {
            HEIGHT = "470px";
        }
 
        var kendoWindow = document.getElementById(frameId);
        if (!kendoWindow) {
            kendoWindow = $("<div>").attr({ id: frameId }).appendTo("body");
        }
 
        __modalKendoWindow = $(kendoWindow).kendoWindow({
            title: TITLE,
            modal: true,
            width: WIDTH,
            height: HEIGHT,
            visible: false,
            deactivate: function () {
                this.destroy();
            },
        }).data("kendoWindow").center().refresh(LINK).open();
 
        $(kendoWindow).css({ overflow: "none" });
 
        return false;
    }
 
    function modalReturn(value) {
        __modalKendoWindow.close();
        if (value) {
            if (__functionCallback) {
                __functionCallback(value);
            }
        }
    }
}
The application is being written with Visual Studio 2012 with a WebForms application.


So I set my menu to open the windows. This is the main page:
<script>
     $(function () {
         $('#tabMenu a').click(function (e) {
             e.preventDefault();
             kendoWindowFactory.createKendoWindow(this);
         });
     });
 
     $(document).ready(function () {
         $("#tabMenu").kendoTabStrip();
     });
 </script>


So I set the child pages (which are opened within kendoWindows using iframe) to open a modal window.
Fits a search window, for example:
<script type="text/javascript">
    function returnValue(value) {
        document.getElementById("<%= txtCodigo.ClientID.ToString() %>").value = value;
        __doPostBack("Municipio.aspx", "txtCodigo_TextChanged");
    }
 
    $(function () {
        $("#<%= btnConsultar.ClientID.ToString() %>").click(function (e) {
            e.preventDefault();
            window.parent.kendoWindowFactory.createModalKendoWindow(this, returnValue);
        });
    });
</script>

Every kendoWindow is created and removed dynamically.

To return a selection made in the modal window use this code:
<script type="text/javascript">
    $(function () {
        $("#grvMunicipio").kendoGrid({
            columns: [
                { field: "Codigo", title: "Código" },
                { field: "Descricao", title: "Município" },
                { field: "Uf", title: "Estado" }
            ],
            dataSource: {
                pageSize: 15
            },
            sortable: true,
            selectable: true,
            pageable: {
                refresh: true,
                pageSizes: true
            }
        });
 
        $('#grvMunicipio').dblclick(function () {
            var Grid = $("#grvMunicipio").data("kendoGrid")
            Grid.select().each(function () {
                var dataItem = Grid.dataItem($(this));
                RetornaValor(dataItem.Codigo);
            });
        });
    });
</script>
I use a callback routine passed as a parameter to the main page, the JavaScript function created, which is to destroy the modal window and return the value to the desired field.

My problem is: When I open the modal window by button link child window, the child window is frozen.
I close the modal and I can no longer use the controls / window elements daughter.
However, when moving the child window with the mouse controls are released.

The child page now has no code in your code behind.

Can anyone help me with a particular problem?

From now on, thank you all!
Tiago
Top achievements
Rank 1
 answered on 10 Dec 2012
5 answers
121 views

We are very interesting about the telerik products we have gone through the many kendo examples which provided in telerik official website as well as in other forums but we just get the simple staff.

We are planning to start a new web project with the MVVM frame work with Kendo . We are unable to find the complete real example for Kendo UI for web based systems as you have developed it for telerik Ajax(eg : sales Dash Board).

If it is their sample code please be kind enough to send us

We are very much interesting to get you feed back on this

BS 

Development Team
Dimo
Telerik team
 answered on 10 Dec 2012
1 answer
119 views
Hi ,

when i bind dynamic column to telerik gid, filter(column search) icon is overlapping on  existed column text.PFA(OverlappingColumnName.jpg) for your reference.

I have display the full  column name with filter icon.

Note:
Number of columns will be changed based on permission.(admin role - 20 columns, customer role -10 columns)

please help me on this ASAP.
Nishant
Top achievements
Rank 1
 answered on 10 Dec 2012
3 answers
1.1K+ views
We would like to update a data source when a refresh button is clicked. In my javascript file I have the following declared:

var seriesData1 = [{"UnitNumber":"1010", "percent":85, "PMTYPE":"ODOMETER", "CompCode":"000-003"}, {"UnitNumber":"1010", "percent":75, "PMTYPE":"Days", "CompCode":"000-005"}];

I have this defined in my index.html:

<script>
function createChart() {
$("#chart").kendoChart({
theme: $(document).data("kendoSkin") || "black",
dataSource: {
data: seriesData1

},
title: {
text: "PMs Due"
},
legend: {
position: "top"
},
seriesDefaults: {
type: "column"
},
series: [
{
name: "% Due",
field: "percent"
}
],
valueAxis: {
labels: {
format: "{0}%"
}
},
categoryAxis: {
field: "CompCode"
},
tooltip: {
visible: true,
format: "{0}%"
}
});
}
</script>

When I click on the refresh button I am changing the values as follows in my javascript:

seriesData1 = [{"UnitNumber":"1010", "percent":35, "PMTYPE":"ODOMETER", "CompCode":"000-060"}, {"UnitNumber":"1010", "percent":75, "PMTYPE":"Days", "CompCode":"000-005"}];

$(".chart").data("kendoChart").redraw();

All that has changed is the percent and comp code of the first record .

On first load data is displayed without error however when the button is clicked to redraw the graph, the data is cleared and nothing is updated leaving a blank chart.

Is there anything else that I have to do to update the data source?

T. Tsonev
Telerik team
 answered on 10 Dec 2012
0 answers
147 views
Following is an example of using facebook login for your kendo mobile webapp

http://www.grapto.com/publication/314/416 (web browser)
http://www.grapto.com/mobile/publication/314/416 (mobile)

the workaround on function LogIn() is for iPhone pinned on homescreen webapps. It will ask for login without poping the safari browser.
you may remove this workaround if you don't want to run your app on iPhone homescreen. Keep it if you want to publish with phonegap or other tools.

contact me for any further thoughts or if you need help implementing your own facebook apps with kendoui.
Fotis Papppas
Top achievements
Rank 2
 asked on 09 Dec 2012
1 answer
204 views
Hello, either there is a memory leak with grid's (when used with a filter) or I'm using it wrong.  I'm hoping that I'm using it wrong!  So I've created a jsfiddle that demonstrates the problem below.  The problem seems to be that when i reload the grid (by removing the grid first) it seems to leave the hidden k-filter-menu behind in the dom.  If you keep on clicking reload you will eventually run out of memory.  You can best see the problem if you load up firefox + firebug.  Inspect the grid and click reload, you'll notice the orphaned filter forms keep on adding up.

http://jsfiddle.net/nZ7j3/5/

ps. i didn't bother create a fiddle for it, but the same problem exists for any kendo object that maintains a hidden form element (i'm generalizing but i've definitely seen it on the DropDownList, ComboBox)
Christopher Ronak
Top achievements
Rank 1
 answered on 09 Dec 2012
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?