Telerik Forums
Kendo UI for jQuery Forum
3 answers
282 views
I have a combobox who's html source is below.  When I try to bind my viewModel using MVVM, the following message is displayed: "change binding is not supported by the select element".  The funny thing is that this works fine on the 1012.1.229 beta, but does not work when I switch to 2012.1.335 commercial release.  Can anyone help with this?

HTML Code:
<select id="tePriority" class="tePriority editControl autoCommit" data-bind="change: onPriorityChange">
<asp:PlaceHolder ID="phPriority" runat="server"></asp:PlaceHolder></select>
Rosen
Telerik team
 answered on 20 Apr 2012
1 answer
67 views
Hi

I can change the view background image using style tag.

But when i goto other view and i come back the background is missing. Why?

Petyo
Telerik team
 answered on 20 Apr 2012
2 answers
911 views
I am loading a dropdownlist from a datasource but wish to trigger another action when the first item is selected but I do not seem to be able to get Kendo to trigger a change event?

The change fires OK when I actually select another item (as expected) but I would like an initial change event to be fired.

Leaving out the index it does load OK and appear to select the first item OK but I do not get any event.

Any ideas on how this can be done?
Vadivel
Top achievements
Rank 1
 answered on 20 Apr 2012
2 answers
354 views
Hello,

I tried to use kendo upload and that works but I get a error message when upload finish.

Kendo upload does everything right and at the end the file was uploaded but kendo upload says that it had a problem.

I know that in Save file if response is empty means the process was good otherwise the process had a problem.

I think the problem is caused because of response of apache, it says that My Content-Length = 2 but really My response was empty.

I took this examples from kendo examples

This is the raw view of the response of my web server:

HTTP/1.1 200 OK
Date: Tue, 17 Apr 2012 06:31:58 GMT
Server: Apache/2.2.21 (Win32) PHP/5.3.8
X-Powered-By: PHP/5.3.8
Content-Length: 2
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html


Code html/js:
<div id="example" class="k-content">
 
    <div style="width:60%">
        <input name="files[]" id="files" type="file" />
    </div>
 
</div>
       
    <script>
        $(document).ready(function() {
            $("#files").kendoUpload({
                async: {
                    saveUrl: 'save.php',
                    removeUrl: 'remove.php',
                    autoUpload: true
                }
            });
        });

    </script>

code save.php:

<?php
    $fileParam = "files";
    $uploadRoot = "c:/upload/";
    $files = $_FILES[$fileParam];
     
    if(!is_dir($uploadRoot))
    {
        mkdir($uploadRoot, 0777, true);
        chmod($uploadRoot, 0777);
    }
 
    if (isset($files['name']))
    {
        foreach ($files["name"] as $i => $name) {
            $error = $files['error'][$i];
 
            if ($error == UPLOAD_ERR_OK) {
                $targetPath = $uploadRoot . basename($files["name"][$i]);
                $uploadedFile = $files["tmp_name"][$i];
 
                if (is_uploaded_file($uploadedFile)) {
                    if (!move_uploaded_file($uploadedFile, $targetPath)) {
                        echo "Error moving uploaded file";
                    }
                }
            } else {
                // See http://php.net/manual/en/features.file-upload.errors.php
                echo "Error code " . $error;
            }
        }
    }
    // Return an empty string to signify success
    echo "";
?>

code remove.php:

<?php
    $fileParam = "files";
    $uploadRoot = "c:/upload/";
    $fileNames = $_POST["fileNames"];
 
    if (isset($fileNames))
    {
        foreach ($fileNames as $i => $name) {
            $targetPath = $uploadRoot . basename($name);
            if (!unlink($targetPath)) {
                echo "Error removing file";
            }
        }
    }
 
    // Return an empty string to signify success
    echo "";
?>



Is there a way to configure kendo upload to understand another answer than empty? For example a JSon like {Status:0}

Thank you,
Daniel Botero Correa
Daniel Botero Correa
Top achievements
Rank 1
 answered on 20 Apr 2012
0 answers
290 views
Is there a way to prevent the detail template from automatically opening on load?

I am referring to your Grid / Detail template example http://demos.kendoui.com/web/grid/detailtemplate.html

I want the user to have to select a record to open the detail grid.

ANSWER:
Sorry I didn't notice this was being called:
this.expandRow(this.tbody.find("tr.k-master-row").first());

Regards,
Mark.
Mark
Top achievements
Rank 1
 asked on 20 Apr 2012
3 answers
577 views
I am trying to set the text color for my autocomplete box on the fly.  I was able to get it working with the combobox thanks to your help in another thread, but having trouble applying that same logic to the autocomplete.

I grab the autocomplete box like this:
var cinput = $("#boxName").data("kendoAutoComplete");


cinput is an object, so at least it's not undefined, but I don't know if it's the correct object or if I am not setting the color properly (or both!).

But then it doesn't do anything when I try setting the color via any of the following (not all at once obviously):

cinput.css("color", "red");
cinput.color = "red";
cinput.style.color = "red";
cinput.foreground = "red";

but no luck.  I'm probably missing something fundemental due to my lack of JS experience.  Also without any intellisense it feels like I'm just taking shots in the dark, any guidance in that respect is greatly appreciated, in addition to a solution to my specifc question of course.
William
Top achievements
Rank 1
 answered on 19 Apr 2012
1 answer
393 views
I want to bind a combobox to a remote odata service to do a case insensitive search of the dataTextField. Setting ingoreCase property doesn't seem to do anything. So I'm trying to set up a custom query string like this  /Countries?$filter=startswith(tolower(Name),tolower('Ca')) 
explained in this stackoverflow post using parameterMap function but cant seem to get my function right. What should be the correct parameterMap function.
.kendoComboBox({
                                        dataTextField: "Description",
                                        dataValueField: "Code",
                                        minLength: 3,
                                        autoBind: false,
                                        dataSource: {
                                            type: "odata",
                                            serverPaging: true,
                                            pageSize: 30,
                                            transport: {
                                                read: {
                                                    url: odataUrl,
                                                    dataType: "json"
                                                },
                                                parameterMap: function (options) {
                                                    if (options.filter) {
                                                        var thisfilter = filter.filters[0];
                                                        return { filter: thisfilter.operator + "(tolower('" + thisfilter.value + "'), tolower(" + thisfilter.field };
 
                                                    }
                                                }
 
 
                                            }
                                        }
                                    });
What should the parameterMap function return?
Satish
Top achievements
Rank 1
 answered on 19 Apr 2012
0 answers
169 views
Hey all,

I've been starting to play with Drag and Drop, but there's not a lot of information out there on how to accomplish other scenarios. I was thinking a simple example would be to have two lists, and add the ability to move items from one list to another. 

Is there any way you could provide a couple more examples?

Thanks!
Greg
Greg
Top achievements
Rank 1
 asked on 19 Apr 2012
2 answers
89 views
I have some pages served by JBoss on a different port so I have to use an http:// url.

In general, can Window show the page delivered by POST ing data to a remote server ?

Thanks,
Richard
Richard
Top achievements
Rank 1
 answered on 19 Apr 2012
1 answer
123 views
Hello,

I have dynamic data source using Web service json. I have bind data and columns dynamically. I want to bind data source schema fields dynamically. How to achieve this because schema fields are not array its object?

Also,for editing and adding template we need dropdown based on dynamic columns. How to do this?

Also, for drop down how to select option based on Value not text?
Schlurk
Top achievements
Rank 2
 answered on 19 Apr 2012
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?