Telerik Forums
Kendo UI for jQuery Forum
5 answers
353 views
Hi 

Im trying to put the upload component inside window.
After the select file window is opened and i select a file, i see it twice in the list. if i uncheck the multiple option then i see it uploaded twice to the server but in the list i see only one file.

i have the latest jquery and kendoui libraries.

  @(Html.Kendo().Window()
           .Name("window")
           .Title("Upload images")
           .Content(@<text>
                         @(Html.Kendo().Upload().Multiple(false)
                                     .Name("files")
                                     .Async(a => a
                                                     .Save("Save", "Properties")
                                                             .Remove("Remove", "Properties")
                                                     .AutoUpload(true)
                                     )
                               )
                     </text>)
           .Draggable()
           .Modal(false).Visible(true))
Drew
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
232 views

When i click on grid i get this error

Syntax error, unrecognized expression: tr:not(.k-grouping-row) > td:not(.k-hierarchy-cell,.k-detail-cell,.k-group-cell,.k-edit-cell,:has(a.k-grid-delete)) 

 

jquery-1.8.0.js, line 4512 character 2

The grid loads with data, paging and sorting works dispite the error, but I can not batch edit, double clicking on cell does not bring up editing.

Any ideas?

Thanks

my grid

$(document).ready(function () {
            dataSource = new kendo.data.DataSource({
                transport: {
                    read:  {
                        url: "/franchisees/stock/EmailKendo",
                        dataType: "json"
                    },
                    update: {
                        url: "/franchisees/stock/Update",
                        dataType: "jsonp"
                    },
                    destroy: {
                        url: "/franchisees/stock/Destroy",
                        dataType: "jsonp"
                    },
                    create: {
                        url: "/franchisees/stock/Create",
                        dataType: "jsonp"
                    },
                    parameterMap: function(options, operation) {
                        if (operation !== "read" && options.models) {
                            return {models: kendo.stringify(options.models)};
                        }
                    }
                },
                batch: true,
                pageSize: 25,
                schema: {
                    model: {
                        id: "ProductID",
                        fields: {
                            ProductId: { editable: false, nullable: false },
                            Name: { validation: { required: true } },
                            Level: { type: "number", validation: { required: true } },
                            MinQuantity: { type: "number" },
                            OrderByThe: { type: "number" },
                            Order: { type: "number", editable: true }
                }
                    }
                }
            });
 
        $("#grid").kendoGrid({
            dataSource: dataSource,
            navigatable: true,
            sortable: true,
            pageable: true,
            toolbar: ["create", "save", "cancel"],
            columns: [
                "Name",
                { field: "Level",  width: 150 },
                { field: "MinQuantity", width: 100 },
                { field: "OrderByThe", width: 100 },
                { field: "Order", width: 100 }],
            editable: true
        });
    });

Alan Mosley
Top achievements
Rank 1
 answered on 22 Aug 2012
0 answers
54 views
Hi, I writing beacouse i have problem with sort column. My column content date on format: 17-08-2012/22:03. When i sort this column i get sort example:
13-08-2012/22:03
13-07-2012/22:03
17-06-2012/22:03
17-06-2012/22:03
21-08-2012/22:03

Or
21-08-2012/22:03
17-06-2012/22:03
17-06-2012/22:03
13-08-2012/22:03
13-07-2012/22:03

I try add to column format: "{0:dd-MMMM-yyyy/h:s}" but this is not working.

        field: "data",
        title: "<?php echo $translate->_("Date");?>",
        sortable: true,
        filterable: false,
        width: 120,
        format: "{0:dd-MMMM-yyyy/h:s}"


Please help me:/

Ps. sorry for my poor english.
Jacek
Top achievements
Rank 1
 asked on 22 Aug 2012
3 answers
175 views
Hi guys,

I'm trying to change my tabstrip gradient color and it's not working. How do I change it?

This is what I currently have:

#custTab .km-tabstrip {background-color:#ccc;}

All that does is change the top half of the tabstrip
Martin
Top achievements
Rank 1
 answered on 22 Aug 2012
0 answers
73 views
Hi all,
All elements of kendo ui are very fexible and usable. That is very important but elements as filters, page, and sorts in grids or width in splitter, can be saved state.
states can be saved for future elements entered by means of cookies?
and then set starting these elements obtained from the cookies saved?

The ui framework have any native method for this, or there is that develop any solutions...

best regards
bogamo
Top achievements
Rank 1
 asked on 22 Aug 2012
0 answers
106 views
How to get Time Picker/ DateTime in editable grid
piyusjh
Top achievements
Rank 1
 asked on 22 Aug 2012
1 answer
107 views
if i have a function like

displayMessage = function (displayTitle, display) {
                $("<div></div>").kendoWindow({
                    animation: {
                        open: {
                            effects: "slideIn:left fadeIn",
                            duration: 500
                        },
                        close: {
                            effects: "slide:left fadeOut",
                            duration: 500
                        }
                    },
                    visible: true,
                    title: displayTitle,
                    modal: true,
                    width: "50%",
                    deactivate: function () {
                        this.element.closest(".k-widget").remove();
                    }
                }).data("kendoWindow")
                .content(display)
                .center()
                .open();
            }

and call the method:

displayMessage("Test", "<label>Hi there</label>");

In firefox, safari, chrome, ie9 this works.

In ie8 the window pops up. The title is shown but the content is blank, nothing is there. Why is the content not showing?

Thanks,
zhin
Top achievements
Rank 1
 answered on 22 Aug 2012
3 answers
432 views
Hey all,

I'm coming across some strange issues.  In my "create" button on my kendo MVC grid (using the defaults for the grid, such as:
.ToolBar(commands => commands.Create()

1] I can't override the default width of the window with the "min size" properties, or any other html attributes to work when creating a window from the create / update button within a grid.  I basically want it to be a square, 450x450, and can't accomplish this by adding in new { @style="height:450px; width:450px"} or the minHeight/minWidth property of the window inside my grid. 

What do I do to get the popup-edit window in my grid to seize according to my definition?

2]  In my grid, I have this:
.Editable(editable => editable.Mode(GridEditMode.PopUp)
                                                .TemplateName("PolicyViewModel")
                                                .Window(window => window.Title("Manage Policy"))))


In a SharedTemplate for the editor pop-up window, I have a couple of drop downs, e.g.:
@(Html.Kendo().DropDownListFor(m=>m.SourceId)
        .SelectedIndex(0)
              .DataTextField("Name")
              .DataValueField("Id")
              .Value(Model.SourceId.ToString(CultureInfo.InvariantCulture))
              .BindTo(ViewBag.sources))         


The drop down binds perfectly well, but on submitting the data, my selections (and defaults) are always ignored / never sent over the wire.  I'm not too sure why at this point...

Why oh why is that the case?  What am I doing incorrectly?
Sig
Top achievements
Rank 1
 answered on 22 Aug 2012
0 answers
108 views
try to auto redirect users to home page after execute 

listView.remove(listView.element.children().first()); 

using command window.location.href="account.php?do=dashboard";  for redirection, however page is redirected but the record still there.

please help
Alan
Top achievements
Rank 1
 asked on 21 Aug 2012
0 answers
199 views
I know that you can apply a template to a field in the grid to display an empty string instead of a null, but can you do the same thing for the resulting field in the popup edit window?  The following is what I have, but is filling the Address2 textbox with 'null' when the popup is displayed.

$(document).ready(function () {
                        dataSource = new kendo.data.DataSource({
                            transport: {
                                read: {
                                    url: "@Url.Action("Read", "Address")"
                                },
                                update: {
                                    url: "@Url.Action("Update", "Address")",
                                    type: "POST",
                                    complete: function(data) {
                                           $('#grid').data('kendoGrid').dataSource.read();
                                           alert("Address successfully updated");
                                        }
                                },
                                  parameterMap: function(data, operation) {
                                    if (operation != "read") {
                                        // post the products so the ASP.NET DefaultModelBinder will understand them:
                                        var result = {};
                                        for (var i = 0; i < data.models.length; i++) {
                                            var address = data.models[i];
                                        }
                                        return address;
                                    }
                                }
                            },
                            batch: true,
                            pageSize: 30,
                            schema: {
                                model: {
                                    id: "AddressID",
                                    fields: {
                                        AddressID: { editable: false, nullable: false },
                                        Address: { type: "string", validation: { required: true} },
                                        Address2: {
                                            type: "string",
                                            template: "#= (Address2 == 'null') ? ' ' : Address2 #"
                                        },
                                        City: { type: "string" },
                                        State: { type: "string" },
                                        Zip: { type: "string" },
                                    }
                                }
                            }
                        });

            $("#grid").kendoGrid({
                dataSource: dataSource,
                pageable: true,
                height: 400,
                columns: [
                            { field: "Address", title: "Address", width: "250px" },
                            { field: "Address2", title: "Address2", width: "200px"
                                , template: "#= (Address2 == 'null') ? ' ' : Address2 #"
                            },
                            { field: "City", width: "100px" },
                            { field: "State", width: "100px", maxlength: "2" },
                            { field: "Zip", width: "100px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px"}],
                editable: "popup"               
            });
        });
Chris
Top achievements
Rank 1
 asked on 21 Aug 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
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
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?