Telerik Forums
UI for ASP.NET MVC Forum
3 answers
90 views
At Runtime:
Kendo.Mvc.UI.Fluent.EditorToolFactory' does not contain a definition for 'ViewHtml' and no extension method 'ViewHtml' accepting a first argument of type 'Kendo.Mvc.UI.Fluent.EditorToolFactory' could be found (are you missing a using directive or an assembly reference?)

Kendo.Mvc.dll
Version 2013.2.918.340

What gives?
Daniel
Telerik team
 answered on 10 Jan 2014
2 answers
133 views
I have a weird problem with grid paging.
Whenever i select apge 11 it does not work. I still see page i was before. e.g. on page 10 i press next - i still see page 10.

The grid setup: PageSize(10), pageable.ButtonCount(5)
Total data count: 112

Loaded dynamically by ajax:
Json result looks like (generated with kendo function extionsion ToDataSourceResult()):
{
  "Data": [
    ... 10 items ...
  ],
  "Total": 112,
  "AggregateResults": null,
  "Errors": null
}

I have logged the DataResults - and i saw, that the correct items are send back to the client, but they are not displayed (but only on page 11 - all other pages show the correct items, even page 12, when ein press the last page button).
Is there a bug in kendo ui grid? (i'm using the latest kendo ui version 2013.3.1119)
Oliver
Top achievements
Rank 1
 answered on 09 Jan 2014
2 answers
347 views
I need the parent's item while binding the child item setting it's action.  I need to pass the categoryName from the category (parent) on the child action call.  Is this possible?  If so, how?  Any help is very much appreciated!

Here is the panelbar code:
@(Html.Kendo().PanelBar()
.Name("MainMenu")
.ExpandMode(PanelBarExpandMode.Single)
.BindTo(Model, mappings =>
    {
        mappings.For<GMCWeb.Areas.bi.Models.ReportCategory>(binding => binding
            .ItemDataBound((item, category) =>
                {
                    item.Text = "<div class='row'><div class='col-md-9'>" + category.categoryName + "</div><div class='col-md-3 menu-arrow'><i class='fa fa-arrow-circle-right fa-2x'></i></div></div>";
                    item.Encoded = false;
                })
                .Children(category => category.reportCategories));
        mappings.For<GMC.CustomerInformation.DashboardParameters.ReportCategoryInformation>(binding => binding
            .ItemDataBound(
            (item, reportCategory) =>
               {
               item.Text = reportCategory.ReportCategoryName;
               item.Enabled = !reportCategory.Disabled;
               item.Action("GetReports", "Home", new RouteValueDictionary { { "category", category.categoryName } });
               }));    
    }))
Donna Stewart
Top achievements
Rank 1
 answered on 08 Jan 2014
10 answers
681 views
My application is in ASP.NET MVC 5 using Razor views and remote data stored in a SQL Server database.

I have a Kendo Grid which contains a list of Users. This list of users then becomes a resource list in a Kendo Scheduler.

The problem I have is when I add a new user to the grid, open the scheduler then open the task editor the new user does not appear in the resource list; the new user appears in the grid and is created in the database. If I exit the application and then re-run it the user is present in the scheduler resource dropdown. In other words the resource datasource is not being refreshed when the scheduler is displayed.

Now the complication:
The user grid sits in a Partial View: The grid has a toolbar template consisting of a 'Create New User' button(editing is via a popup)  and a Kendo button which calls a script to display a Kendo Window; the window is model and configured via .LoadContentsFrom to display the scheduler view.

I have tried several methods, found on this forum, to get the scheduler resources to update before opening the task editor without success.

Your help would be appreciated

Alan
Alan
Top achievements
Rank 2
 answered on 08 Jan 2014
4 answers
135 views
Hey,

I've been using your MVC wrappers for some time and I absolutely love them!
I just migrated a project on which I was using the Telerik Extensions for ASP.NET MVC to use Kendo UI. There have been some problems, but in the end it works like a charm.

I'm just faced with an issue I can't resolve...
On a "Details" page, I have a static, server-bound grid with a column which has a specific EditorTemplate, itself using a Kendo DropDownList.

All my controls use the deferred JS output to keep all the JS clean and at the bottom of the page.
My issue is that the initalization script of the DropDownList is outputted right after the <input> and not at the bottom of the page where I call the DeferredScripts() function.

Let me show you some code that may clear up what I'm trying to explain.

My Models:
public class MyParentViewModel
{
    public IEnumerable<MyChildViewModel> Children
    {
        get;
        set;
    }
}
 
public class MyChildViewModel
{
    public String DummyString
    {
        get;
        set;
    }
 
    public Boolean? DummyBoolean
    {
        get;
        set;
    }
}
My view:
@model MyParentViewModel
 
@(
    Html.Kendo().Grid(Model.Children)
        .Name("Children")
        .Deferred()
        .Columns(c =>
        {
            c.Bound(x => x.DummyString);
            c.Bound(x => x.DummyBoolean);
        });
)
The EditorTemplate associated to the DummyBoolean property:
@model Boolean
 
@(
    Html.Kendo().DropDownListFor(x => x)
        .Deferred()
        .Items(items =>
        {
            items.Add().Selected(value == false).Text("Non").Value(Boolean.FalseString);
            items.Add().Selected(value == true).Text("Oui").Value(Boolean.TrueString);
        })
        .HtmlAttributes(new { style = "width:100px; line-height:normal;" })
)
And that's the outputted HTML:
<div class="k-widget k-grid k-secondary" id="Groupements" data-role="grid">
    <table role="grid">
        <colgroup>
            <col style="width:20%">
            <col>
        </colgroup>
        <thead class="k-grid-header">
            <tr>
                <th class="k-header" data-field="DummyString" data-title="DummyString" scope="col">
                    <span class="k-link">DummyString</span>
                </th>
                <th class="k-header" data-field="DummyBoolean" data-title="DummyBoolean" scope="col">
                    <span class="k-link">DummyBoolean</span>
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Groupement #1</td>
                <td>
                    <input disabled="disabled" id="DummyBoolean" name="DummyBoolean" style="width:100px; line-height:normal;" type="text" value="True">
                    <script>
                        jQuery(function () { jQuery("#DummyBoolean").kendoDropDownList({ "dataSource": [{ "Text": "Non", "Value": "False", "Selected": false }, { "Text": "Oui", "Value": "True", "Selected": true }], "dataTextField": "Text", "dataValueField": "Value" }); });
                    </script>
                </td>
            </tr>
            <tr class="k-alt">
                <td>Groupement #2</td>
                <td>
                    <input disabled="disabled" id="DummyBoolean" name="DummyBoolean" style="width:100px; line-height:normal;" type="text" value="True">
                    <script>
                        jQuery(function () { jQuery("#DummyBoolean").kendoDropDownList({ "dataSource": [{ "Text": "Non", "Value": "False", "Selected": false }, { "Text": "Oui", "Value": "True", "Selected": true }], "dataTextField": "Text", "dataValueField": "Value" }); });
                    </script>
                </td>
            </tr>
        </tbody>
    </table>
</div>
As you can see, we only have here the DropDownLists' initialization scripts.
The table's is at the bottom of the page where I expect it to be.

Is there anything I'm missing?
Thanks in advance.
Sincerely,
Mickaël Derriey
Alexander Popov
Telerik team
 answered on 08 Jan 2014
5 answers
582 views
I'm initialising a chart in MVC razor syntax, and am unable to find a way of specifying the schema of returned data from an AJAX bound DataSource, as specified in the DataSource documentation:

schema: {
    data: "results" // twitter's response is { "results": [ /* results */ ] }
}

As I'm not autobinding my chart, I've tried setting the schema property in JS before calling the read() method on the DataSource , but this doesn't seem to make any difference:

chart.dataSource.options = { schema: { data: "results" } };

Is this functionality possible using the ASP.NET wrappers?
Orrin
Top achievements
Rank 1
 answered on 07 Jan 2014
1 answer
98 views
I just downloaded and installed a trial of Kendo UI Complete for ASP MVC.  I am running VS 2012.  I Opened the examples project (Kendo.MVC.Examples) and tried out some of the mobile components.  Most of them seem to be broken.  For example, when you try out the drawer.

http://localhost:56541/razor/mobile/drawer/index
Your port number might be different.1

Click on the button that opens the drawer (upper left corner).  A javascript error is thrown.
Uncaught Error: Syntax error, unrecognized expression: #!
The error is thrown from jQuery and is complaining about the bang symbol after the hash.

I am trying to create my own prototype app from your example code and am encountering the same issues.

Thanks for your help.
Kiril Nikolov
Telerik team
 answered on 07 Jan 2014
1 answer
142 views
Hello,

I've tried this on the online demo at : 

http://demos.kendoui.com/web/editor/all-tools.html

click the View Html tool, edit the first img tag and add onerror="imgError()" to it.

Click update button. View Html again and my change has now disappeared. Why is that ?
I've first noticed it locally and I thought I did something wrong, then I tried it on the online demo section and the same behaviour happens. 

Things get even weirder if you add something like onerror="alert('The image could not be loaded.')"

if you view html again this is what you get : 

<img alt="Editor for ASP.NET MVC logo" be="" could="" image="" loaded.');"="" not="" src="http://www.kendoui.com/Image/kendo-logo.png" style="display:block;margin-left:auto;margin-right:auto;" the="" />

Looks like a big bug to me.
Alex Gyoshev
Telerik team
 answered on 06 Jan 2014
1 answer
326 views
Hi -

I am trying to implement a ListView with remote call from the example using MVC helpers.
I am using MVC5 and Kendo Q3.

I am creating a ListView that calls a controller method to retrieve data. However, nothing is
display and putting a debug break point is never executed on the controller.

Any ideas?  

My helper HTML is straight from the example codes and looks like this:

                        @(Html.Kendo().ListView<StatusItemInfo>()
                                .Name("statuslistview")
                                .TagName("div")
                                .ClientTemplateId("template")
                        .DataSource(dataSource => 
                            dataSource.Read(read => read.Action("Products_Read", "Home"))
                        )
                        )

My controller:


        public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
        {
            List<StatusItemInfo> myList = new List<StatusItemInfo>();
            var info = new StatusItemInfo();
            info.Location = "Sams Plaza";
            info.EcoSystem = "POS";
            info.Category = "File";
            info.Age = "7 hours";
            info.Division = "Div 2";
            myList.Add(info);

            DataSourceResult results = myList.ToDataSourceResult(request);
            return Json(results, JsonRequestBehavior.AllowGet);
        }

My template:
<script type="text/x-kendo-template" id="template">
    <div class="col-md-3 col-xs-3">
        <div class="issue-card white-bg border-wrap ">
            <div class="card-title border-bottom">
                <h4 class="error"><span class="companyFieldNumberIssues">#:Location #</span></h4>
            </div>
            <div class="stacked-stats">
                <h3 class="no-margin">#:Category #</h3><span>#:Age #</span>
                <h3 class="no-margin">#:EcoSystem #</h3><span>#:Division #</span>
            </div>
        </div>
    </div>
</script>

I don't see any javascript console errors.   
In the Network tab of Chrome developer tools, I do not see any calls to my controller.

What am I doing wrong?

Thanks,
bruce 
bruce
Top achievements
Rank 1
 answered on 06 Jan 2014
1 answer
211 views
I have a requirement to override the existing window to add an event as we have additional field we would like to display. The Template open correctly and populates the standard scheduler columns. However before opening the window I need to call our server to get a list of event types and a list of member (or possible members). 

or index.cshtml looks like this

            @(Html.Kendo().Scheduler<TalkBox.Mvc.ViewModels.Calendar.CalendarViewModel>()
                  .Name("scheduler")
                  .Date(DateTime.UtcNow)
                  .Timezone("Etc/UTC")
                  .Height(700)
                  .BindTo(Model)
                  .Views(views =>
                            {
                                views.DayView(dayView => dayView.Selected(true));
                                views.WeekView();
                                views.MonthView();
                                views.AgendaView();
                            })
                   .DataSource(d => d
                        .Model(m => m.Id(f => f.EventId))
                        .Read(u => u.Action("Read", "Calendar"))
                        .Update(u => u.Action("Update", "Calendar").Data("serialize"))
                        .Create(c => c.Action("Create", "Calendar").Data("serialize"))
                        .Destroy(delete => delete.Action("Delete","Calendar"))
                    ) 
                    .Editable(e => e.TemplateName("CalendarEditor"))

I thought that the .Read(u => u.Action("Read", "Calendar")) would fire the read function before the template is displayed.

How do I fire an event on open of the new template?

Damion


Georgi Krustev
Telerik team
 answered on 06 Jan 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
DropDownButton
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
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
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?