Telerik Forums
UI for ASP.NET MVC Forum
1 answer
199 views
Hi,
I have a DropDownList that is initially binded on the server side with BindTo method (I am using DropDownListFor).
On the client (JS code) I need to clear its items and then repoppulate the control with other items.
What is the best practice to accomplish this?

Thanks,
Lauri
Petur Subev
Telerik team
 answered on 26 Jul 2013
1 answer
190 views
I have a kendo grid that that uses a ClientDetailTemplate to display a second sub-grid.  The sub-grid has a variety of commands that are in the toolbar, including a Kendo Upload control.  

The problem is that the Kendo control is surrounded in a div, so it breaks the single line appearance of my toolbar.  Is there any way to change the Upload control so that it can be used inline with other controls?

Thanks,
~Logan
Dimiter Madjarov
Telerik team
 answered on 26 Jul 2013
6 answers
218 views
After just downloading and upgrading to build 2013.1.319 - I now receive the following error when starting my app:

Microsoft JScript runtime error: Object doesn't support property or method 'live'

The error occurs in jQuery.unobtrusive-ajax.js (Asp.net mvc):

$("a[data-ajax=true]").live("click", function (evt) {
        evt.preventDefault();
        asyncRequest(this, {
            url: this.href,
            type: "GET",
            data: []
        });
    });

p.s. I am using the jquery.min.js that comes with the latest Kendo build.

Please advise. 
Brad Fulton
Top achievements
Rank 1
 answered on 25 Jul 2013
8 answers
107 views
I've noticed now the grid is posting filter data even though I haven't defined any filter on the client/server side. This is causing a Binding error - DataSourceRequest.

When I create a dummy filter with the wrapper it no longer throw exception. However even if I disable the Filterable option it still throws and passing filter post data.
.DataSource(ds => ds.Ajax()
                           .Batch(true)
                           .Filter(f=> f.Add(d=> true))
See the examples of post data between working and not. I'm not sure if it's the wrappers or the JS but thinking it might be Js causing the Binding to throw.

Old Post Format:
sort=FacilityName-asc&page=1&pageSize=25&group=&filter=

New Post Format Failing:
sort=FacilityName-asc&page=1&pageSize=25&group=&filter=undefined~undefined~undefined

New Post Format Working - see above for the dummy filter:
sort=FacilityName-asc&page=1&pageSize=25&group=&filter=undefined~eq~null


Please advise.
Patrick
Nikolay Rusev
Telerik team
 answered on 25 Jul 2013
1 answer
197 views
Hi,
How can I add validation for the fields like title and description or even to resources in MVC ?
Vladimir Iliev
Telerik team
 answered on 25 Jul 2013
1 answer
244 views
Sorry if this has been covered somewhere, but I'm new to Kendo and am having trouble finding examples and/or documentation on this.

Basically I'm trying to figure out how to leverage a LinqtoSql entity framework in a .NET MVC application to handle edits/updates/deletes to my database with a Kendo Grid. I'm coming from an AJAX .NET webforms (so not even MVC!) world where tying a .NET grid to a LinqDataSource was pretty much all you needed to handle CRUD operations.

Thanks!
Petur Subev
Telerik team
 answered on 25 Jul 2013
6 answers
121 views
Hi, 
    I am trying to render a different partial view based on a property of the model. I will then need to pass the model from the current enumeration to the Html.RenderPartial called in the template 

as below i need to pass the current model from the edit to the RenderPartial i.e. "themodel".  How do I get the syntax to pass the model to it?

Thanks 

@using Assessments.Models;
@model IEnumerable<FallsAssessment>
 
@{
    ViewBag.Title = "FallsAssessmentList";
}
 
<h2>FallsAssessmentList</h2>
@Html.Kendo().Grid(Model).Name("FallsAssessments").Columns(columns=>
    {
        columns.Bound(m => m.AssessmentType).Title("Assessment Type");
        columns.Bound(m=> m.Ward).Title("Ward");
        columns.Bound(m=>m.LastUpdated_TS).Title("Last Updated");
        columns.Bound(m => m.LastUpdatedBy).Title("User");
        columns.Bound(m => m.Score);
        columns.Command(m => m.Edit().Text("Edit"));
    }
    ).ToolBar(t=>t.Create()).DataSource(d=>d.Ajax()
        .Model(
            model=>
                {
                    model.Id(id=>id.EventID);
                    model.Field(field=>field.EventID).Editable(false);
                }).Create("Create", "FallsAssessment").Update("Update", "FallsAssessment")).Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("edit-template"))
               
 
              FallsAssessmentFallsAssessmentFallsAssessment
 
<script id="edit-template" type="text/x-kendo-template">
#if(AssessmentType=='Child'){#
@Html.RenderPartial("AdultAssessment",themodel)
#}else{#
@Html.RenderPartial("AdultAssessment", themodel)
#}
</script>
Daniel
Telerik team
 answered on 25 Jul 2013
1 answer
608 views
I am following the Using Kendo UI with MVC4 WebAPI OData and EF article.  After installing KendoUI and making sure all references are set, I type in three characters, and get the following error:
  • Uncaught TypeError: Object #<Object> has no method 'slice'
I cleaned up kendo.web.min.js and the error is occuring around line 3498:
success: function (n) {
     var i = this,
         r = i.options;
     return i.trigger(wt, {
         response: n,
         type: "read"
     }), n = i.reader.parse(n), i._handleCustomErrors(n) ? (i._dequeueRequest(), t) : (i._pristine = et(n) ? e.extend(!0, {}, n) : n.slice ? n.slice(0) : n, i._total = i.reader.total(n), i._aggregate && r.serverAggregates && (i._aggregateResult = i.reader.aggregates(n)), n = i._readData(n), i._pristineData = n.slice(0), i._data = i._observe(n), i._addRange(i._data), i._process(i._data), i._dequeueRequest(), t)

The Kendo UI widgets are loading just fine as well as the css:

<link href="~/Content/kendo/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo/kendo.default.min.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.9.1.min.js"></script>
<script src="~/Scripts/kendo/kendo.web.min.js"></script>
<script src="~/Scripts/kendo/kendo.aspnetmvc.min.js"></script>
<script src="~/Scripts/appScripts.js"></script>
And I am seeing the same error both with using the Razor MVC helper/extension:

@(Html.Kendo().AutoComplete()
    .Name("userAutoComplete")                   // specifies the "id" attribute of the widget
    .DataTextField("USERNAME")
    .DataSource(source =>
        {
            source.Read(read =>
                {
                    read.Url("/api/user");
                })
                  .ServerFiltering(true);       // if true, the DataSource will not filter the data on the client
        }
    )
)
and through directly through JS:

/// <reference path="kendo/kendo.aspnetmvc.min.js" />
/// <reference path="kendo/kendo.core.min.js" />
/// <reference path="kendo/kendo.autocomplete.min.js" />
/// <reference path="kendo/kendo.web.min.js" />
 
$(document).ready(function () {
    // load up KendoUI
     
    // gets data from /api/user
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: "/api/user"
            }
        }
    });
 
    $("#userSearch").kendoAutoComplete({
        dataSource: dataSource,
        dataTextField: "USERNAME",
        minLength: 3
    });
 
    $("#userSearch").on('input', function () {
        console.log($("#userSearch").val());
    });
 
}); // $(document).ready()


I'm sure this is something simple that I may be missing.  I have tried both with the web and all js files.

Any assistance would be appreciated.


Thanks.

B
Top achievements
Rank 1
 answered on 24 Jul 2013
1 answer
105 views
Hello again,
The grid,supports to double-click the column header margins,and resize automatically to its longest value?
,something like is in the windows Explorer and you see the files in Detail format.

Regards,
Daniel
Dimiter Madjarov
Telerik team
 answered on 24 Jul 2013
5 answers
531 views
I am having difficulty working out how to add a Date picker to the Grid ToolBar in order that I use it to filter a large data set (500,000+ reords).

The documentation for showing how to do this for Kendo UI doesn't translate easily to MVC warpper versions.
Vladimir Iliev
Telerik team
 answered on 24 Jul 2013
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
ColorPicker
DateRangePicker
Security
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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?