Telerik Forums
Kendo UI for jQuery Forum
1 answer
114 views
Hi,

I've a very strange behavior trying to close the keyboard when closing a modalview.

My modalview is like this:
<div id="modalview-create-post" data-role="modalview" style="width:100%;height:100%;" data-open="showCreateNewPost" data-init="initCreateNewPost">
                <div id="modalview-post-content">
                    <div>
                        <a id="new-post-cancel" data-click="closeCreateNewPost" data-role="button">Cancel</a>
 
                        <a id="new-post" data-click="createPost" data-role="button">Post</a>
                        <span id="new-post-count"></span>
                    </div>
 
                    <textarea id="new-post-txt" class="watermark" counterSelector="#new-post-count" ></textarea>
                </div>
            </div>
function closeCreateNewPost() {
    forceBlurTextarea($('#new-post-txt'));
    $('#modalview-create-post').data('kendoMobileModalView').close();
}
function forceBlurTextarea(textarea) {
    $(textarea).val($(textarea).text());
    var cssClass = $(textarea).attr('class');
    $(textarea).attr('class', cssClass.replace("unwatermark", "watermark"));
}

As you can see, my modalview contains a textarea and a cancel button to close the modalview. The cancel button is not at the same HTML-DOM level as the textarea.

The first time I open the modalview, click inside the textarea (to make the keyboard appear) and then click on cancel to close the modalview, all is going well => modalview closes, keyboard automatically disappear

The 2nd time I do this, the modalview also closes BUT the keyboard stays visible!

Now if I put the 'cancel' button JUST AFTER the textarea (at the same HTML-DOM level as the textarea), it's working every time.

Do you have an explanation on why this is happening?

By the way, does it give a function to programmatically open/close the keyboard?

Thanks for your support.
Bastien
Petyo
Telerik team
 answered on 25 Jan 2013
1 answer
74 views
Hi,

I have a GridView which is populated from the database.
Each row in the GridView can be edited.

One column in the GridView bound to boolean (bit) filed ("IsEnabled").
When Grid row is in edit mode this "IsEnabled" filed is changed to checkbox.

I would like the change checkbox with image (two images, one for checked state, another for the unchecked state).
Is that possible and how to do it?

Tnx,
Siam
Petur Subev
Telerik team
 answered on 25 Jan 2013
4 answers
175 views
Is there any information about Jquery 1.7.2 compatibility?
Can we move to this release safely?
Atanas Korchev
Telerik team
 answered on 25 Jan 2013
12 answers
692 views
I've created a grid with Ajax datasource and set 'Groupable()', but when I try to group by the first column (a text field), the field has the circle with a cross icon (not allowed) and can't be dropped in the 'Drag a column header here....' area.

I have also set grouping to default to the first columns, which works, but if I remove that grouping (by clicking on the close icon for the column header), grouping is cancelled and I can't drag it back.
Web Monkey
Top achievements
Rank 1
 answered on 24 Jan 2013
1 answer
253 views

.k-grid-header {font-size: x-small !important;}

works fine in IE but I'm not having any success with Chrome, FF, or Opera.  What is the proper cross-browser CSS to set the font-size of the header?

Thanks

Tim R
Top achievements
Rank 1
 answered on 24 Jan 2013
2 answers
475 views
Just upgraded to jQuery 1.9.0 and now I'm getting this error.

Uncaught TypeError: Object function (e,t){return new st.fn.init(e,t,X)} has no method 'sub'


    <link rel="stylesheet" type="text/css" href="../../Content/kendo/2012.3.1114/kendo.common.min.css" />
    <link rel="stylesheet" type="text/css" href="../../Content/kendo/2012.3.1114/kendo.blueopal.min.css" />

    <script src="../../Scripts/jquery-1.9.0.min.js"></script>
    <script src="../../Scripts/kendo/2012.3.1114/kendo.web.min.js"></script>

George
Top achievements
Rank 1
 answered on 24 Jan 2013
1 answer
71 views
Hello, 

If I provide this simple data to a chart, the chart data shows up correctly.
var data = [
                {"state":"NY","abc":12312},
                {"state":"AZ","abc":12312},
                {"state":"CA","abc":12312},
                {"state":"VT","abc":12312}
            ];
Please note that the above JSON has STRINGS for the keys.

However, if I provide a number as a key, I get an "Unexpected number at line number 2156" error.

var data = [
                {"state":"MH","1":12312},
                {"state":"MH","1":12312},
                {"state":"MH","1":12312},
                {"state":"MH","1":12312}
            ];

Any help?
Iliana Dyankova
Telerik team
 answered on 24 Jan 2013
1 answer
106 views
In the Roadmap, a new Kendo Web Tooltip Widget is scheduled for Q1. We are eagerly awaiting this new feature. Is there a projected release date for it? Is there any "beta" version available for now?
Sebastian
Telerik team
 answered on 24 Jan 2013
2 answers
503 views
I want to change the text on the button without making a page transition. The initial text is 'Show', but when I click the button it should be change to 'hide'.
I have a button in html like this:
<a href="" id="btnShowHide" data-role="button" style="background-color: rgb(135, 196, 66);">Show</a></div>


I have this function to toggle the text:
$("#btnShowHid").kendoMobileButton({
                click: function (e) {
                    var element = document.getElementById('btnShowHide');
                    if (element.innerText === "Hide") {
                        window.localStorage.removeItem(followProjectID);
                        element.innerText = "Show"
                    }
                    else {
                        window.localStorage.setItem(followProjectID, (followProjectTitle + "|" + followProjectImageUrl + "|" + followProjectDescription));
                        element.innerText = "Hide"
                    }
                    // $("#btnShowHid").kendoMobileButton();
                    e.preventDefault();
                }
            });



However,  the text doesn't change
Jan-Dirk
Top achievements
Rank 1
 answered on 24 Jan 2013
2 answers
1.0K+ views
hi,

I am trying to follow the very simple validation example. I have this written:

    $(document).ready(function () {
        var validatable = $("#myform").kendoValidator().data("kendoValidator");
        $("#save").click(function () {
            if (validatable.validate()) {
                alert('Valid');
            } else {
                alert('Not valid');
            }
        });
    });

and html:

    <div id="myForm">
        <fieldset>
            <label for="Name">Name</label>      
            <input type="text" id="Name" name="Name" required/>
            <br/>
            <label for="Age">Age</label>     
            <input type="text" id="Age" name="Age">
            <br/>
            <label for="Phone">Phone</label>
            <input type="text" title="Phone Number" id="Phone" pattern="\d{10}" validationMessage="please enter a ten digit phone number"/>
            <br/>
            <button id="save" type="button" class="k-button"></button>
            <!--<input type="submit" id="Submit" value="Submit" @*onclick="checkValidation()"*@/>-->
        </fieldset>

it says that 'validatable' is not defined. But what's weird is when I step through the code in Firebug, it shows the proper return when I call manually $("#myform").kendoValidator().data("kendoValidator"). It seems only if I put it in a variable, that variable is undefined.

Can anyone help? maybe I am missing some JS references? Which ones do I need for this? please help.

thanks!
Drew
Top achievements
Rank 1
 answered on 24 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?