Telerik Forums
Kendo UI for jQuery Forum
2 answers
959 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
411 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
348 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
640 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
427 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
235 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
108 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
157 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
3 answers
297 views
I've currently got a scenario where I'm binding a grid via MVVM, but don't want the data to read automatically. Is the autoBind attribute currently supported when using MVVM? Or are there any workarounds for this?

Thanks!
Luc
Top achievements
Rank 1
 answered on 19 Apr 2012
3 answers
124 views
Hi,

I'm trying to use the kendo editor in a Windows 8 Metro (html, js, css) app and having issues,all i get is a white box that wont accept focus, and there is no toolbar.

There are no javascript errors and the page has references to all required js and css files. jQuery 1.7.2 and kendo.web.min

I also tried this in a new metro app based on the Blank Application template with the same results.

Is there something I am missing or is the editor not supported in a windows 8 metro app yet?

Thanks,

Adam
Adam Nelson
Top achievements
Rank 2
 answered on 19 Apr 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
Drag and Drop
Application
Map
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?