Telerik Forums
Kendo UI for jQuery Forum
1 answer
95 views
Some cases grouping not working with error found in firebug is

TypeError: a is undefined
http://localhost:1467/Scripts/kendo.web.min.js
Line 8

and page getting hang with loading image.
Atanas Korchev
Telerik team
 answered on 29 Nov 2012
1 answer
88 views
Hi,

Is there a way to sync an element after create was called?
EX: In edit or update there are only a number of field that are actually set by user the rest are only information. While displaying editor I do not want to pull reference information however the new value returned from controller is being ignores.
// I have a data source defined
Workbench = new kendo.data.DataSource({
    transport: {
        create: {
            url: "/api/workbench",
            type: "POST"
        }
    }
})
// I add a new object to Data source
Workbench.add({...});
// and call sync the action on workbench
// controller returns a new object with id and other
// properties set however I think the return is being
// ignored
Workbench.sync();
Rosen
Telerik team
 answered on 29 Nov 2012
2 answers
204 views
For some strange reason, the GroupName column returns a null value to the controller even though I enter a value into the grid UI. The GroupDescription column passes the entered value successfully. Both columns are strings except GroupName is a required field in the GroupVM view model. The work around is that I have to use a clientemplate for GroupName (see below)

THIS WORKS: columns.Bound(p => p.GroupName).ClientTemplate("#=GroupName #").Title("Group Name");
THIS DOES NOT WORK: columns.Bound(p => p.GroupName).Title("Group Name");



@model IEnumerable<
ViewModels.GroupVM>
 
@(Html.Kendo().Grid<ViewModels.GroupVM>()
 
.Name("GroupGrid")
    .ToolBar(toolbar => toolbar.Create().Text("Create"))
                .Editable(editable => editable.Mode(GridEditMode.InLine))
                .Pageable()
                .Sortable()
                .Scrollable()
.Columns(columns =>
     {
         columns.Bound(p => p.GroupId).Hidden();
         columns.Bound(p => p.GroupName).ClientTemplate("#=GroupName #").Title("Group Name");
         columns.Bound(p => p.GroupDescription).Title("Group Description");
         columns.Command(command => { command.Edit(); }).Width(200);
     })
          .DataSource(dataSource => dataSource
                    .Ajax()
                    .Model(model =>
                            {
                                model.Id(p => p.GroupId);
                            })                    
                        .Events(events => events.Error("error_handler"))
                        .Create(update => update.Action("ManageGroups_C", "Group"))
                        .Read(read => read.Action("ManageGroups_R", "Group"))
                        .Update(update => update.Action("ManageGroups_E", "Group"))
                )
     )
 
      <script type="text/javascript">
         function error_handler(e) {
             if (e.errors) {
                 var message = "Errors:\n";
                 $.each(e.errors, function (key, value) {
                     if ('errors' in value) {
                         $.each(value.errors, function () {
                             message += this + "\n";
                         });
                     }
                 });
                 alert(message);
             }
         }
</script>
Vladimir Iliev
Telerik team
 answered on 29 Nov 2012
1 answer
282 views
Hi,

I'm currently struggling to define a combobox in a grid popup template. The combobox should react on its own change event.

Is this possible and can somebody give me an example on how to achieve this?

sincerely,
tom
Jeremy Cook
Top achievements
Rank 1
 answered on 29 Nov 2012
1 answer
220 views
Hello,
Is it possible to not display the separator in the menu?

Thanks,
David A.
Iliana Dyankova
Telerik team
 answered on 28 Nov 2012
1 answer
732 views
where can I find documentation or examples of how to align the dropdown arrow with css that's currently aligned to the right of each tab to the left?
Iliana Dyankova
Telerik team
 answered on 28 Nov 2012
7 answers
420 views
Hi, I would like to know if there are any future plans to include a minus data-icon for data-role button?

Also how can i make a button round if it has a data-icon, i want to achieve a button like that of the iphone message application for sms.
 
Thanks in advance
Brandon Peterson
Top achievements
Rank 2
 answered on 28 Nov 2012
2 answers
155 views
It seems that if the bottom of a modal window is below the bottom of the browser window then it doesn't respond properly to mouse clicks anymore. Just setting the height to something like 2000 is enough to reproduce the behavior. Now when pushing the close button the window doesn't close, just scrolls into view. The same thing happens to the editor window of the grid.
Lucian
Top achievements
Rank 1
 answered on 28 Nov 2012
1 answer
177 views
Yo,

I'm using the KendoGrid, and there's a problem in my CRUD process. When I'm clicking to update button after editing data (in popup mode) in first time, the ajax call and the update in server works fine. But when I'm trying to edit an another row, the update ajax call runs twice, for this row, and the previous row. Here's my code:

        var dataSource = new kendo.data.DataSource({
            transport: {
                create: {
                    url: GLOBALS.BASE_URL + "partner_editor_ajax/create",
                    dataType: "json",
                    type: "POST",
                    complete: function(e) {
                        dataSource.read();
                    }
                },                
                read:  {
                    url: GLOBALS.BASE_URL + "partner_editor_ajax/read",
                    dataType: "json",
                    type: "POST"          
                },
                update: {
                    url: GLOBALS.BASE_URL + "partner_editor_ajax/update",
                    dataType: "json",
                    type: "POST",
                    complete: function(e) {
                        e.preventDefault();
                    }          
                },
                destroy: {
                    url: GLOBALS.BASE_URL + "partner_editor_ajax/destroy",
                    dataType: "json",
                    type: "POST"
                }
            },
            pageSize: 30,
            batch: false,
            schema: {
                data: "results",
                total: "results_per_page",
                errors: "errors",
                model: {
                    id: "_id",
                    fields: {
                        _id: { editable: false, nullable: false },
                        employeesNumber: { editable: false, nullable: true },
                        leaderName: {
                            editable: true, 
                            validation: {
                                required: true,
                                pattern: "(.+){2,50}"
                            }
                        },
                        mailingAddress: { 
                            editable: true, 
                            validation: {
                                required: true,
                                pattern: "(.+){2,}"
                            }
                        },
                        name: { 
                            editable: true, 
                            validation: {
                                required: true,
                                pattern: "(.+){2,}"
                            } 
                        },
                        taxNumber: { 
                            editable: true, 
                            validation: { 
                                required: true,
                                pattern: "[0-9]{6,20}"
                            } 
                        },
                        type: { 
                            defaultValue: { value: "personal", text: "personal"},
                            editable: true, 
                            validation: { 
                                required: true,
                                pattern: "(.+){2,}"
                            } 
                        },
                        website: { editable: true }
                    }
                }
            }
        });


        $("#grid").kendoGrid({
            dataSource: dataSource,
            pageable: true,
            height:  ($(window).height() - $("#header").height() - 4),
            toolbar: ["create"],
            columns: [              
                { 
                    field: "employeesNumber",
                    title: Localization.get_localized_text("employees_number"),
                    width: "50px"
                },
                { 
                    field: "leaderName",
                    title: Localization.get_localized_text("leader_name"),
                    width: "150px"
                },                
                { 
                    field: "mailingAddress",
                    title: Localization.get_localized_text("mailing_address"),
                    width: "200px"
                },                
                { 
                    field: "name",
                    title: Localization.get_localized_text("name"),
                    width: "150px"
                },                
                { 
                    field: "taxNumber",
                    title: Localization.get_localized_text("taxNumber"),
                    width: "150px"
                },                
                { 
                    field: "type",
                    title: Localization.get_localized_text("type"),
                    editor: typeDropDownEditor,
                    width: "100px"
                },                
                { 
                    field: "website",
                    title: Localization.get_localized_text("website"),
                    width: "100px"
                },         
                { 
                    command: ["edit"], title: "&nbsp;", width: "60px" 
                },         
                { 
                    command: ["destroy"], title: "&nbsp;", width: "70px" 
                }
            ],
            editable: {
                mode: "popup"
            }
        });        


Please help, what is the problem here?

Thank you in advance,
R
Tetha
Top achievements
Rank 1
 answered on 28 Nov 2012
1 answer
383 views
Hi,
Is there any alternative of using AdditionalViewData if I need to include some data to my editortemplate?
The AdditionalViewData option is better than nothing but there should be a "better" way instead of using ViewData.

If there isn't anyway today, here is two options:
1. Create a similar method to AdditionalViewData and use it like:
.Editable(editing => editing.AdditionalData(m => m.MyData = Model.MyData })
In this way I can add some data to my editortemplates viewmodel from the current model of the view.

2. Fire a "Create" ActionResult
In a way like a normal MVC flow, when clicking "Add new item"-button, the page reloads and fires an action method like "Create" instead of the current one "Index". And in this method I can add the data I need.
public ActionResult Index(GridCommand command)
{
     var model = ...
     return View(model);
}
 
public ActionResult Create(GridCommand command)
{
     var model = ...
     model.MyData = ...
     return View("Index", model);
}
I can't figure out how no 2 would work but maybe you can come up with a smart solution. Or at least no 1 would be possible I think. :)

Regards,
Mattias
Petur Subev
Telerik team
 answered on 28 Nov 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
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
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?