Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.0K+ views
I have a situation where the activate event (or any tab event for that matter) does not fire when i programmatically select a tab. What i am eventually attempting to do is have my app perform a search on one tab and then populate the contents of the grid within another tab (Grid tab) and have that grid be 100% height of the tab.

Seems the grid only displays properly when the tab activate event fires (to resize the tab and grid). But its not in this case.

JSFiddle:

http://jsfiddle.net/jmika99/urYVe/1/

Thanks,
Ashley
Iliana Dyankova
Telerik team
 answered on 25 Apr 2013
1 answer
124 views
Hi Guys,


Since Our database is using AUS format date not US Format.I have added this in my cshtml page, but it is not working since when it pass to the controller it still get the US Date format.

my cshtml page is also inside the Kendo ui tab

i have placed the following in my cshtml page, however the controller still pick up US date format:

<script type="text/javascript" src="@Url.Content("~/Scripts/kendo/cultures/kendo.culture.en-AU.min.js")" ></script>
<script>
kendo.culture("en-AU");
</script>


Please advise
Daniel
Telerik team
 answered on 25 Apr 2013
3 answers
740 views
How can I get the id of the current view?

So for the code example below, it should alert "page_introduction". 

Example:
<div data-role="view" data-layout="app" data-title="My App" id="page_introduction" data-transition="fade">
content
</div>

<script>
alert("You are currently watching "+app.view.id());
</script>
Petyo
Telerik team
 answered on 25 Apr 2013
1 answer
74 views
Usually i am using below  syntax to get popup. It is working fine.

<a data-align="right" data-role="button" data-rel="modalview" href="#MySetttings"/></a>  
 

The issue is Now, i have one .aspx page which i want to open in popup. I am using below  syntax  is not  Working 

<a data-align="right" data-role="button" data-rel="modalview"  href="Settings.aspx"/></a> 
Petyo
Telerik team
 answered on 25 Apr 2013
1 answer
83 views
When using RequireJS to initialize kendo.view.min, IE10 returns error "Object doesn't support property or method 'bind'". The Kendo View does not work in both IE10 and Chrome unless kendo.binder.min is also included.

Expected behavior: Kendo View should just work when kendo.view.min is included in the require line.

The attached .zip contains one index.htm file where the Kendo View does not work until kendo.binder.min is moved inside the require line.

<script>
    require(['jquery', 'kendo.view.min'], function ($) { // add 'kendo.binder.min' and the issue is fixed
            var login = new kendo.View("login-template");
            login.render("#application");
    });
</script>

<div id="application"></div>
 
<script type="text/x-kendo-template" id="login-template">
    <div>This is the login template.</div>
</script>
Petyo
Telerik team
 answered on 25 Apr 2013
3 answers
408 views
Hi 

I have a listview for students, and the images of the students are stored in the database. how do i render those in the listview?

Any help is appreciated. 

Thanks,
Nick
Alexander Valchev
Telerik team
 answered on 25 Apr 2013
1 answer
104 views
I am running into a problem with the TabStrip and wondering if you guys have come across this issue, or even know a workaround for it.

When loading content in the tabstrip with AJAX you are able to quickly click between tabs before they are loaded. This causes all tabs clicked to be styled like they are active and actually appends the content it gets back from the AJAX call all on to the same tab.

Is there a way to stop this? I have some example code if necessary but I am able to replicate the problem using your "Loading content with AJAX" demo at http://demos.kendoui.com/web/tabstrip/ajax.html

http://imageshack.us/photo/my-images/20/tabstripproblem.jpg/
I have attached the screenshot as well from your demo page showing the problem. The exact same thing is happening in our code.

Any ideas?

-b
Brian
Top achievements
Rank 1
 answered on 25 Apr 2013
2 answers
674 views
I'm trying something very similar like this example which I found online and is working:

http://jsfiddle.net/OnaBai/S7K4r/


The only difference is that I use the "hashtag notation" for the template. In the following example, I only changed one minor thing in the template (I added hashtags around the first label: #:text1#):

#:text1#

http://jsfiddle.net/w5P9U/4/

The problem here is that an exception "Uncaught ReferenceError: text1 is not defined" is thrown when initializing the window. This is reasonable, as the window isn't bound to any dataItem at that moment, although I don't understand why a similar exception isn't thrown when using the "data-bind" syntax.

Anyways, I tried a lot of different things to avoid this to no avail.

E.g.: Not setting the template at initialization, but setting it after the dataItem has been bound:

    kendoWindow.content({
        template: $("#record-jsp").html()
    });

also

    kendoWindow.content({
        data: record,
        template: $("#record-jsp").html()
    });

didn't work.

Is it possible to use the hashtag notation in this scenario?



fretje
Top achievements
Rank 1
 answered on 24 Apr 2013
2 answers
251 views
Short and sweet: Please show me how I can nest templates.

Example of what I want to do:
I want to dynamically include in a jQuery Tipped tooltip a select tag
<select id="example">
and then call
$("#example").select2();
on that tag.  I am struggling to come up with a clean way to do this.

Full-blown JSFiddle:
The following JSFiddle demonstrates that script tags cannot be nested in KendoUI templates: http://jsfiddle.net/johnzabroski/NHG3d/10/

Analysis:
I know why this doesn't work (see below), but I can't figure out a clean alternative.

I even tried a hack [ http://www.willmaster.com/blog/javascript/nested-javascript.php ] to inject a script tag into the template via document.write(string): http://jsfiddle.net/johnzabroski/uy86N/7/

This isn't even clean, and it did not work.

After I built this demonstration, I thought it would be a good idea to check what the HTML5 specification says [1], and also ran my markup [3] through the W3C's experimental HTML5 validator [2].  It is not really clear from the HTML5 spec what the behavior should be.  The spec mentions something about nested scripting tags in the parsing model overview [ http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#overview-of-the-parsing-model ], but then does not go on to define what that means.  Meanwhile, the grammar for script tags seems to suggest you cannot nest script tags directly as I have done below [3].  This is confirmed by how Chrome parses my JSFiddle examples.  After the first closing script tag, it treats the whole as closed, and then treats the Hello, World! DIV as if it was outside the script tag.




[1] http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#scriptingLanguages
[2] http://validator.w3.org/check 
[3]
<!DOCTYPE html>
<head>
</head>
<body>
<script type="text/plain" id="example">
    <script type="text/javascript">
        <!--
$("#example-container select").select2();
-->
    </script>
    <div>Hello, World!</div>
</script> 
</body>
John
Top achievements
Rank 1
 answered on 24 Apr 2013
3 answers
325 views
I have the following code:
   <script type="text/javascript">
        $(function() {
            var url = urltogetdata;
            $("#products").kendoDropDownList({
                dataTextField: "name",
                dataValueField: "name",
                dataSource: {
                    transport: {
                        read: {
                            url: url,
                            contentType:'application/javascript; charset=utf-8',
                            type:'GET',
                            dataType:'jsonp'
                        },
                        schema: {
                            data: "result"
                        }
                    }
                }
            });
        });
</script>
<asp:HiddenField ID="webServer" runat="server" />
 <asp:HiddenField ID="cred" runat="server" />
 <input id="products" style="width: 250px" />

When I hit the url directly an excerpt of the response is:
{"result":[{"name":"228 - Sal ","entityIdentifier":{"id":23}},{"name":"230 - Fitters Truck","entityIdentifier":{"id":24}},{"name":"2300 - Duane Agnew","entityIdentifier":{"id":20}}, etc....

When I run this the ddl just spins and nothing happens. Why?

Also, if I want to bind the dataTextField to name and the dataValueField to the entityIdentifiers id property how would I do this?

Thanks.
Elliot
Top achievements
Rank 1
 answered on 24 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?