Telerik Forums
Kendo UI for jQuery Forum
3 answers
298 views
We've been working on protoyping an application and would like to allow the user to have maximum flexibility to hide/unhide columns and perhaps reorder columns.  I'm going to call this column manipulation.

We started out by using columnTemplates to format columns and column manipulation presented no issue.  

However, we also want to be able to mark the entire row of the grid (i.e. when the item the row represents becomes "used") by assigning the whole row a CSS class or style (e.g. "opacity:0.30"), so we switched to a row template so that we could create the <tr> element and set its class according to a data value.  We also created an alternate row template that differs only by adding the k-alt class.  Works well.

However, if we allow the column menu to manipulate the list of columns, the rowTemplate (coded to expect a particular list of columns in a certain order) has a bit of an issue.

Do you have a suggestion for how to handle the whole-row decoration without using a row Template, or how to write a rowTemplate that is aware of the column manipulation?

In a somewhat related vein, is there an easy way for a columnTemplate to know what column it has been summoned forth to format?  Say I want to use the same exact template for 2 (or more) columns.  However, the columnTemplate is passed the entire model, not just the column to be formatted.  No problem for a columnTemplate that only handles one column, but an issue for one that doesn't know which of the columns it should format data from.
Daniel
Telerik team
 answered on 22 Apr 2013
1 answer
81 views
Inside your GettingStarted section, the web editor page ends up in strange content...

See the page at http://docs.kendoui.com/getting-started/web/editor/overview

What’s going on for this editor related documentation page? I would like some content to appear, for me to ne known to the editor mechanismes...

Dimo
Telerik team
 answered on 22 Apr 2013
1 answer
144 views
Run attach solution, it generates an error.
If you remove the ValidateAntiForgeryToken from the TenantController.TenantList method it is successful.
Petur Subev
Telerik team
 answered on 22 Apr 2013
1 answer
217 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
65 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
80 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
182 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
433 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
72 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
617 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
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
AICodingAssistant
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?