Telerik Forums
Kendo UI for jQuery Forum
1 answer
230 views
Hi, 

I am using MVC4 with Entity Framework 5 and I have the following piece of code that I got using samples posted on your website. Apparently, the Grid does not load at all. Am I missing something here?

I do want to mention that the Admin controller is in an "Admin" Area and I have routed requests to the Admin section correctly. Also the UnitOfWork object returns an IEnumerable object which I transpose to Kendo's DataSourceRequest. Currently, this function returns two objects in my test cases and I can see that when I go directly to the url that is bound to the read portion of the dataSource object.

Below is the Controller code.
Imports PropertyCentral.Domain.Entities
Imports PropertyCentral.Domain.Interfaces
Imports PropertyCentral.Domain.Repositories
 
Imports Kendo.Mvc.UI
Imports Kendo.Mvc.Extensions
 
Namespace Admin.Controllers
 
    '<Authorize(Roles:="Administrator")>
    Public Class UsersController
        Inherits System.Web.Mvc.Controller
 
        Private _uow As IUnitOfWork
 
        Public Sub New(uow As IUnitOfWork)
            If uow Is Nothing Then
                Throw New ArgumentNullException("uow")
            End If
            _uow = uow
        End Sub
 
        '
        ' GET: /Admin/Users
        Function Index() As ActionResult
            Dim users = _uow.Users.SelectAll().AsEnumerable()
            Return View("~/Areas/Admin/Views/Users/Index.vbhtml", users)
        End Function
 
        '
        ' GET: /Admin/Users/Users_Read
        Function Users_Read(<DataSourceRequest()> request As DataSourceRequest) As ActionResult
            Dim users = _uow.Users.SelectAll().AsEnumerable()
            Return Json(users.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)
        End Function
 
    End Class

End Namespace

Here is the View:

@ModelType System.Collections.Generic.IEnumerable(Of PropertyCentral.Domain.Entities.User)
 
@Code
    ViewData("Title") = "Administration/Users"
    Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
 
<div class="widget-box">
    <div class="widget-title">
        <span class="icon">
            <i class="icon-th"></i>
        </span>
        <h5>Users</h5>
    </div>
    <div class="widget-content nopadding">
        @*<div id="userGrid" style="height:380px;"></div>  *@
        @Code
             
            Html.Kendo.Grid(Of PropertyCentral.Domain.Entities.User)(Model) _
                .Name("UserGrid") _
                .Columns(Sub(column)
                                 column.Bound(Function(u) u.UserID)
                                 column.Bound(Function(u) u.UserName)
                                 column.Bound(Function(u) u.FirstName)
                                 column.Bound(Function(u) u.LastName)
                                 column.Bound(Function(u) u.EmailAddress)
                                 column.Bound(Function(u) u.PhoneNumber)
                         End Sub) _
                .DataSource(Sub(dataSource)
                                    dataSource _
                                        .Ajax() _
                                        .Read(Sub(read)
                                         read.Action("Users_Read", "Users", New With {.Area = "Admin"})
                                              End Sub)
                            End Sub)
        End Code
    </div>
</div>
Could you please tell me why the Grid won't load the data?

Thanks,
Akshay
Petur Subev
Telerik team
 answered on 22 Apr 2013
1 answer
101 views
Hi all, it seems that there is a weird bug when trying to edit an element on a sorted/filtered data source, both the element that will be in the previous position of the edited element and the edited element by itself in the new position gets updated with the new values. 

I found that clearing the filter first and then resorting/refiltering will solve it. 
datasource.filter([]);
var c  = datasource.get(id);
c.set("Property", "New Value");
datasource.filter([{
field: "Property",
operator: "==",
value: "New Value"
}]);
Petur Subev
Telerik team
 answered on 22 Apr 2013
3 answers
101 views
Does the Grid's datasource  really need JSon format when I binding the property of a model called student?
Can I use viewresult(list<student>)? I find all the example are return jsonresult.
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Apr 2013
2 answers
195 views

In android device the view title is not visible though the TitleBar is visible.
Is there any way to make the view-title visible in kendo-ui-mobile navbar in android  ?

Kamen Bundev
Telerik team
 answered on 22 Apr 2013
5 answers
452 views
I have been trying to do this but always end up getting a runtime JavaScript Error:

Is there a way to do this?

Here's my view:
@(Html.Kendo().Grid<Scholarship2013.Models.AwardCart>()
        .Name("Essay")
        .Columns(columns =>
        {
             
            columns.Template(@<text></text>).ClientTemplate("#= AwardName # ").Title("Award essay");
             
        }
        )
        .ClientDetailTemplateId("essayTemplate")
        .Pageable()
        .DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
        .Read(read => read.Action("Essay_Read", "Student"))
        .PageSize(10)
        )
         
    )
 
 
<script id="essayTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().TabStrip()
            .Name("TabStrip_" + "#=AwardID#")
            .SelectedIndex(0)
            .Items(items =>
            {
                items.Add().Text("Award Essay").Content(@<text>
 
                   @Html.Kendo().Editor().Name("Test")     
                        
                </text>);
            })
            .ToClientTemplate()
            )
</script>

JS Error:

Unhandled exception at line 9, column 7339 in http://localhost:21527/Scripts/kendo/2012.3.1315/kendo.all.min.js
 
0x800a139e - Microsoft JScript runtime error: Invalid template:'
 
    <div class="k-widget k-tabstrip k-header" id="TabStrip_#=AwardID#"><ul class="k-reset k-tabstrip-items"><li class="k-item k-state-default k-state-active"><a class="k-link" href="\#TabStrip_#=AwardID#-1">Award Essay</a></li></ul><div class="k-content k-state-active" id="TabStrip_#=AwardID#-1" style="display:block">
 
                    
 
                    
 
<textarea cols="20" id="Test" name="Test" rows="5"></textarea><script>
 
    jQuery(function(){jQuery("#Test").kendoEditor({"tools":[{"name":"bold"},{"name":"italic"},{"name":"underline"},{"name":"strikethrough"},{"name":"fontName"},{"name":"fontSize"},{"name":"foreColor"},{"name":"backColor"},{"name":"justifyLeft"},{"name":"justifyCenter"},{"name":"justifyRight"},{"name":"justifyFull"},{"name":"insertUnorderedList"},{"name":"insertOrderedList"},{"name":"outdent"},{"name":"indent"},{"name":"formatBlock"},{"name":"createLink"},{"name":"unlink"},{"name":"insertImage"}],"messages":{"backColor":"Background Color"}});});
 
<\/script>    
 
                        
 
                </div></div><script>
 
    jQuery(function(){jQuery("\#TabStrip_#=AwardID#").kendoTabStrip({});});
 
<\/script>
 
' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n    <div class="k-widget k-tabstrip k-header" id="TabStrip_'+(AwardID)+'"><ul class="k-reset k-tabstrip-items"><li class="k-item k-state-default k-state-active"><a class="k-link" href="#TabStrip_'+(AwardID)+'-1">Award Essay</a></li></ul><div class="k-content k-state-active" id="TabStrip_'+(AwardID)+'-1" style="display:block">\n                   \n                   \n<textarea cols="20" id="Test" name="Test" rows="5"></textarea><script>\n\tjQuery(function(){jQuery("';Test").kendoEditor({"tools":[{"name":"bold"},{"name":"italic"},{"name":"underline"},{"name":"strikethrough"},{"name":"fontName"},{"name":"fontSize"},{"name":"foreColor"},{"name":"backColor"},{"name":"justifyLeft"},{"name":"justifyCenter"},{"name":"justifyRight"},{"name":"justifyFull"},{"name":"insertUnorderedList"},{"name":"insertOrderedList"},{"name":"outdent"},{"name":"indent"},{"name":"formatBlock"},{"name":"createLink"},{"name":"unlink"},{"name":"insertImage"}],"messages":{"backColor":"Background Color"}});});
 
<\/script>    
 
                        
 
                </div></div><script>
 
    jQuery(function(){jQuery("#TabStrip_;o+='=AwardID';").kendoTabStrip({});});
 
<\/script>
 
;o+=;}return o;'


Thanks,
Aaron
Petur Subev
Telerik team
 answered on 22 Apr 2013
1 answer
87 views
Within a panelbar item I have placed a groupable grid.

For this groupable grid placed within the panelbar item, the group mechanism is not operating. Whenever I drag the header against the group bar, it comes up with the group illegal icon.

How to let such a groupable grid be operational within such a  panelbar item?

Jan Kaare
Top achievements
Rank 2
 answered on 21 Apr 2013
7 answers
635 views
I have a grid, with a detail grid and some of the fields in the detail grid refer to foreign key columns.When the editimode is set to inline this produces a dropdown list from which the user can pick a value. But if I change the editmode to popup the field is displayed as a textbox with the numeric key value instead of as a drop down list. Is this by design? 

Is it possible for me to extend the Html Helper?
Ruben
Top achievements
Rank 2
 answered on 19 Apr 2013
1 answer
116 views
Hi, I try to change data from a combobox dynamically.
I got a object containing a javascrip array (Module.Collection)
I create the combobox like:
$("#cboListe").kendoComboBox({
    dataTextField: "Nom",
    dataValueField: "Id",
    dataSource: Module.Collection,
    filter: "contains",
    suggest: true,
    index: 1,
});

Then when the user click on a button, I call this function:
this.AddItemColl = function () {
    Item = new ObjetA();
    Item.Id = this.Collection.length + 1;
    Item.Nom = "Nom" + (this.Collection.length + 1);
    this.Collection.push(Item);
 
    var combobox = $("#cboListe").data("kendoComboBox");
    combobox.dataSource.read();
}

The collection object grow, but the combobox do not reflec change wih the dataSource.Read();
Any idea?
Thanks a lot.
Alexander Valchev
Telerik team
 answered on 19 Apr 2013
7 answers
2.0K+ views
I notice the following 'features' after attaching a change event to a grid.
 1) The change event fires even when an already selected row is clicked on.
 2) The change event fires when clicking on an anchor or a button element in a grid's row.

Any work-around suggestion for the grid to not fire the change event in the above cases is appreciated.

Thank you in advance.
loi
Top achievements
Rank 1
 answered on 19 Apr 2013
3 answers
96 views
Hi Guys!

It's great to see the addition of the three new widgets to the ThemeBuilder page but i noticed when trying to use the AutoComplete and MultiSelect by typing to bring up the results list it doesn't happen because there is a javascript error being thrown. I'm trying to get a look-and-feel using real life functionality of Kendo UI suite of widgets under different themes.

Could we have this full functionality of AutoComplete and MultiSelect widgets enabled in ThemeBuilder page ? 

Cheers!
Kamen Bundev
Telerik team
 answered on 19 Apr 2013
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?