Telerik Forums
UI for ASP.NET MVC Forum
3 answers
193 views

Im using .Net 4.5 MVC and Kendo UI release 2017.3.913 with the MVC wrappers.

I have a Kendo scheduler embedded in a Kendo TabStrip and it works fine so far with exception of displaying All Day events.

A single All Day event displays fine however when I create multiple all day events only the first is ever displayed in the All Day row of the scheduler. (see image Scheduler_InTabStrip)

When I moved the exact same Scheduler out of the TabStrip it displays the multiple All Day events fine (see image Scheduler_OutTabStrip). Im not doing anything fancy css wise in the TabStrip but Im  guessing the TabStrip style/css formatting is affecting the Scheduler somehow.

Ruairi
Top achievements
Rank 1
 answered on 29 Nov 2017
15 answers
5.5K+ views
I have declared the following DropDownList

            @(Html.Kendo().DropDownListFor(model => model.CurrencyCode)
                .OptionLabel("Select Currency Code...")
                .Items(items => {
                    items.Add().Text("U.S. Dollars").Value("USD");
                    items.Add().Text("British Pounds").Value("GBP");
                    items.Add().Text("Hong Kong Dollars").Value("HKD");
                    items.Add().Text("Euros").Value("EUR");
                    items.Add().Text("Chinese Yuan").Value("RMB");
                    items.Add().Text("Russian Rubles").Value("RUB");
                })
            )

When an item is first selected, the value is set to [object Object].  However, after the record is saved, the second time it is selected, the value is set to the correct "Value".

Any ideas what may be causing this?
Dimitar
Telerik team
 answered on 29 Nov 2017
3 answers
841 views

I am unable to get my grid to filter on more than 1 column. When I try to add the 2nd filter I get a 500 error because it seems Kendo is trying to make a call to my MVC action without any parameters. I'm getting this behavior on 2 different grid and dataources.

Grid (shortened):

@(Html.Kendo().Grid<FooItemViewModel>()

    .Name("FooGrid")
    .Columns(column =>
    {
        column.Bound(p => p.FooTypeCode).Title("Type").Width(22);
        column.Bound(p => p.FooCode).Title("Foo Code").Width(40);
        column.Bound(p => p.FooDesc).Title("Foo Description").Width(260);
        column.Bound(p => p.ReportCode).Title("Report").Width(20);
    })
    .Filterable()
    .Sortable()
    .Pageable(builder => builder.PageSizes(new[] { 10, 25, 100 }))
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(25)
        .Model(m =>
        {
            m.Id(s => s.FooID);
            m.Field(s => s.FooID).Editable(false);
        })
        .Read(read => read.Action("Read", "Foo"))
        .Create(create => create.Action("Create", "Foo"))
        .Update(update => update.Action("Update", "Foo"))
        .Destroy(update => update.Action("Delete", "Foo"))
        .Events(events => events.Error("onDataSourceError"))
    ))

Controller:

    public JsonResult Read([DataSourceRequest] DataSourceRequest request)
        {
            var Foos = _db.Foos.Project().To<FooItemViewModel>();
            DataSourceResult response = Foos.ToDataSourceResult(request);
            return Json(response, JsonRequestBehavior.AllowGet);
        }

I have tried adding .ServerOperation(true), but that does not work. When the grid first loads I hit the Read action with empty datasourcerequest as expected. When I add a filter I also hit the server read action with a datasourcerequest and the expected column filter passed in. When I select a 2nd column filter and click "Filter" I get the 500 error in the console because it appears it tries to just call \Foo\Read without any parameters.

I see a "serverFiltering: true" in jquery version, but no equivalent in the MVC wrappers. Any help appreciated.

 

 

Steve
Top achievements
Rank 1
 answered on 28 Nov 2017
3 answers
165 views

I am using the calendar and the scheduler and would like to integrate them so that when the date is selected on the calendar all the "appointments" for that day show on the scheduler next to it.  

It is just a basic calendar and scheduler.

 

 I would like it to look like the attachment

 

 

Plamen
Telerik team
 answered on 28 Nov 2017
2 answers
382 views

When I am using the calendar it is very small and I would like to expand it to fit the entire page width

 

Here is the code I am using:

 

<div style="text-align:center;">
    @(Html.Kendo().Calendar()
.Name("calendar")
)
</div>

 I am not sure if it would be in the css or if I can use the inline styling


Max
Top achievements
Rank 2
 answered on 27 Nov 2017
4 answers
264 views

Hello,

I have an image browser that users are going to be uploading a large number of files to. I'm wondering if it is possible to do one of the following two things to help them manage these images:

1) Sort images shown in the browser by date, rather than name.

2) Automatically select an image on upload. 

Thank you! 

Jackie
Top achievements
Rank 1
 answered on 27 Nov 2017
12 answers
368 views

Hello,

Today I just updated our project to ASP.NET Core 2.0.  It looks like this broke my Kendo grids.  Is this a known problem, if so will it be fixed soon?  The stack trace shows this is happening in the Kendo code.

 

TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultExtensions' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

David
Top achievements
Rank 1
 answered on 27 Nov 2017
1 answer
1.2K+ views

Hi,

I'm having some trouble with setting a DropDownList value while editing a grid inline.

This is my datasource for the DropDownList:

01.var baseTypesDataSource = new kendo.data.DataSource({
02.    type: "json",
03.    transport: {
04.        read: {
05.            url: "Profile/GetBaseTypes"
06.        }
07.    },
08.    schema: {
09.        model: {
10.            id: "merchandisingBaseTypeId",
11.            fields: {
12.                merchandisingBaseTypeId: { type: "number" },
13.                merchandisingBaseType: { type: "string" }
14.            }
15.        }

 

This is my grid:

01.$("#merchandisingProfileGrid").kendoGrid({
02.    dataSource: profilesDS,
03.    columns: [
04.        { field: "profileNo", title: "Profile No" },
05.        { field: "palletBay", title: "Pallet Bay", editor: booleanEditor, template: kendo.template($("#palletBayTemplate").html()) },
06.        { field: "merchandisingBaseType", title: "Base Type", editor: BaseTypesDropdowns, template: kendo.template($("#baseTypeTemplate").html()) },
07.        { field: "quantity", title: "Overs Qty" },
08.        { field: "comments", title: "Notes" },
09.        { command: ["edit"], width: "200px" }
10.    ],
11.    editable: "inline",
12.    filterable: true
13.});

 

And this is my custom editor for the DropDownList:

01.function BaseTypesDropdowns(container, options) {
02.    $('<input id="bt_' + options.model.id + '" required name="' + options.field + '" />')
03.        .appendTo(container)
04.        .kendoDropDownList({
05.            autoBind: true,
06.            dataTextField: "merchandisingBaseType",
07.            dataValueField: "merchandisingBaseTypeId",
08.            dataSource: baseTypesDataSource,
09.            dataBound: function (e) {
10.                $("#bt_" + options.model.id).data("kendoDropDownList").value(options.model.merchandisingBaseTypeId);
11.            },
12.            change: function (e) {
13.                var dataItem = e.sender.dataItem();
14.                options.model.set("merchandisingBaseTypeId", dataItem.merchandisingBaseTypeId);
15.            }
16.        });
17.}

 

I am simply trying to retain the grid value in the dropdown when I edit a row inline.

The above code does correctly work the first time I edit a row, however on subsequent edits the dropdown loads displaying blank, but has the correct value seelcted when I expand the dropdown (can be seen in the attached image).

Stefan
Telerik team
 answered on 27 Nov 2017
8 answers
240 views

Can UI for ASP.NET MVC Window be resized?

I want to make Window resizable by dragging its border, like Windows Explorer' s form. Is it possible?

Dan
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 24 Nov 2017
1 answer
172 views

Hi,

I am using a DataTable to automatically generate grid columns as in the "binding-to-datatable" example.  This is working well, but I can't figure out how to create a dropdown list for a given known column. 

 

Prior to autogenerating the columns, I would use "EditorTemplateName" to specify the editor template.  Can this be done with autogenerated columns, and if so, how? Is there an example of this being done?

 

Thanks in advance,

Ryan

Stefan
Telerik team
 answered on 23 Nov 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
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?