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

I'm trying to display the Agenda view on the Scheduler without the colors. 

 

I have tried using a custom event template like so (edited for brevity):

 

Html.Kendo().Scheduler<Project.Models.ViewModel>()
            .Name("Scheduler")
            .EventTemplate(
                "<div class='agenda-template'>" +
                    "<p>#= title #</p>" +
                "</div>"
            )

 

 

However, this does not get rid of the colors on the Agenda view. Suggestions?

Kiril Nikolov
Telerik team
 answered on 14 Jul 2015
1 answer
661 views

 

I have a EditorTemplate which is:

@model string
 
@(this.Html.Kendo().DropDownList()
    .Name(this.ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
    .Value(this.Model)
    .HtmlAttributes(new { style = "width: 220px;"})
    .OptionLabel("Select)
    .DataValueField("Value")
    .DataTextField("Text")
        .DataSource(ds => ds.Read(read => read.Action("GetList", "Combo").Data("getAdditionalParam")))
)

I want to get this dropdown in my function:

function getAdditionalParam(dropDown){
//do stuff with dropDown

//

 return { additionParam: 1 }
}

 

Is there anyway to pass the object itself as parameter?

 

Thanks,

Ezequiel

Georgi Krustev
Telerik team
 answered on 14 Jul 2015
1 answer
522 views

 When using "Filter Multi Checkboxes "  I get an error saying cannot convert CompositeFilterDescriptor

 to FilterDescriptor . on this line "For Each filterDescriptor As FilterDescriptor In request.Filters"

I understand the error, but  how to get around it,

thanks

 

Imports Kendo.Mvc
Imports System.ComponentModel
Imports System.Collections.ObjectModel
Imports System.Data.Entity
 
Namespace Models.Students
    Public Class StudentGridModel
        Public Property PageSize As Integer = 25
        Private _Students As ReadOnlyCollection(Of BO.Models.Students.Student)
        <System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")> Public Property Students As ReadOnlyCollection(Of BO.Models.Students.Student)
            Get
                Return _Students
            End Get
            Set(value As ReadOnlyCollection(Of BO.Models.Students.Student))
                _Students = value
            End Set
        End Property
 
        Public Property Total As Integer
 
        Sub New()
            Using db As EF.GrasshopperEntities = New EF.GrasshopperEntities
                Me._Students = New ReadOnlyCollection(Of BO.Models.Students.Student)(db.Students.Include(Function(i) i.Franchisee).OrderBy(Function(o) o.StudentId).Take(Me.PageSize).AsEnumerable.Select(Function(s) New BO.Models.Students.Student With {
                                .FirstName = s.FirstName,
                                .FranchiseeName = s.Franchisee.Name,
                                .LastName = s.LastName,
                                .Age = s.Age,
                                .Birthday = s.Birthday,
                                .Female = s.Female,
                                .Suburb = s.Suburb,
                                .PhoneNumber = s.PhoneNumber,
                                .MobileNumber = s.MobileNumber,
                                .Email = s.Email,
                                .TotalSales = s.Sales(),
                                .ProductSales = s.Sales(Function(t) Not t.ProductId.Equals(0)),
                                .EnrolmentSales = s.Sales(Function(t) Not t.EnrolmentId.Equals(0)),
                                .EventSales = s.Sales(Function(t) Not t.StudentEventId.Equals(0)),
                                .StudentId = s.StudentId}).ToList)
                Me.Total = db.Students.Count
            End Using
 
        End Sub
 
        Sub New(request As UI.DataSourceRequest)
            Using db As EF.GrasshopperEntities = New EF.GrasshopperEntities
                Me._Students = New ReadOnlyCollection(Of BO.Models.Students.Student)(GetData(request, Me.Total))
            End Using
        End Sub
 
        ''' <summary>
        ''' Reterns student data for kendo grid
        ''' </summary>
        ''' <param name="request">Kendo.Mvc.UI.DataSourceRequest</param>
        ''' <param name="Total">Integer</param>
        ''' <returns>ReadOnlyCollection(Of BO.Models.Students.students)</returns>
        ''' <remarks></remarks>
        Private Shared Function GetData(ByVal request As Kendo.Mvc.UI.DataSourceRequest, ByRef total As Integer) As ReadOnlyCollection(Of BO.Models.Students.Student)
            Using db As EF.GrasshopperEntities = New EF.GrasshopperEntities
                Dim data As IQueryable(Of EF.Student) = db.Students.Include(Function(i) i.Franchisee)
                If Not request.Sorts Is Nothing AndAlso request.Sorts.Any Then
                    For Each sortDescriptor As SortDescriptor In request.Sorts
                        data = SortStudent(sortDescriptor, data)
                    Next
                Else
                    data = data.OrderBy(Function(o) o.StudentId)
                End If
 
                If request.Filters.Any() Then
                    Dim filterValue As String = String.Empty
                    For Each filterDescriptor As FilterDescriptor In request.Filters
 
                        Select Case filterDescriptor.Member
                            Case "FranchiseeName"
                                filterValue = CStr(filterDescriptor.ConvertedValue)
                                Select Case filterDescriptor.Operator
                                    Case FilterOperator.Contains
                                        data = data.Where(Function(w) w.Franchisee.Name.Contains(filterValue))
                                    Case FilterOperator.DoesNotContain
                                        data = data.Where(Function(w) Not w.Franchisee.Name.Contains(filterValue))
                                    Case FilterOperator.EndsWith
                                        data = data.Where(Function(w) w.Franchisee.Name.EndsWith(filterValue))
                                    Case FilterOperator.IsEqualTo
                                        data = data.Where(Function(w) w.Franchisee.Name.Equals(filterValue))
                                    Case FilterOperator.IsNotEqualTo
                                        data = data.Where(Function(w) Not w.Franchisee.Name.Equals(filterValue))
                                    Case FilterOperator.StartsWith
                                        data = data.Where(Function(w) w.Franchisee.Name.StartsWith(filterValue))
                                End Select
                        End Select
                    Next
                End If
                If request.Filters.Any() Then
                    data = data.Where(ExpressionBuilder.Expression(Of EF.Student)(request.Filters))
                End If
                total = data.Count
 
                If request.PageSize > 0 Then
                    data = data.Skip((request.Page - 1) * request.PageSize)
                    data = data.Take(request.PageSize)
                End If
                Return New ReadOnlyCollection(Of BO.Models.Students.Student)(data.AsEnumerable.Select(Function(s) New BO.Models.Students.Student With {
                                        .FranchiseeName = s.Franchisee.Name,
                                        .FirstName = s.FirstName,
                                        .LastName = s.LastName,
                                        .Age = s.Age,
                                        .Birthday = s.Birthday,
                                        .Female = s.Female,
                                        .Suburb = s.Suburb,
                                        .PhoneNumber = s.PhoneNumber,
                                        .MobileNumber = s.MobileNumber,
                                        .Email = s.Email,
                                        .TotalSales = s.Sales(),
                                        .ProductSales = s.Sales(Function(t) Not t.ProductId.Equals(0)),
                                        .EnrolmentSales = s.Sales(Function(t) Not t.EnrolmentId.Equals(0)),
                                        .EventSales = s.Sales(Function(t) Not t.StudentEventId.Equals(0)),
                                        .StudentId = s.StudentId}).ToList)
            End Using
 
        End Function
 
        Private Shared Function SortStudent(sortDescriptor As SortDescriptor, data As IQueryable(Of EF.Student)) As IQueryable(Of EF.Student)
            If sortDescriptor.SortDirection.Equals(ListSortDirection.Ascending) Then
                Select Case sortDescriptor.Member
                    Case "StudentId"
                        data = data.OrderBy(Function(o) o.StudentId)
                    Case "FranchiseeName"
                        data = data.OrderBy(Function(o) o.Franchisee.Name)
                    Case "FirstName"
                        data = data.OrderBy(Function(o) o.FirstName)
                    Case "LastName"
                        data = data.OrderBy(Function(o) o.LastName)
                    Case "Age"
                        data = data.OrderBy(Function(o) o.Birthday)
                    Case "Female"
                        data = data.OrderBy(Function(o) o.Female)
                    Case "Suburb"
                        data = data.OrderBy(Function(o) o.Suburb)
                End Select
            Else
                Select Case sortDescriptor.Member
                    Case "StudentId"
                        data = data.OrderByDescending(Function(o) o.StudentId)
                    Case "FranchiseeName"
                        data = data.OrderByDescending(Function(o) o.Franchisee.Name)
                    Case "FirstName"
                        data = data.OrderByDescending(Function(o) o.FirstName)
                    Case "LastName"
                        data = data.OrderByDescending(Function(o) o.LastName)
                    Case "Age"
                        data = data.OrderByDescending(Function(o) o.Birthday)
                    Case "Female"
                        data = data.OrderByDescending(Function(o) o.Female)
                    Case "Suburb"
                        data = data.OrderByDescending(Function(o) o.Suburb)
                End Select
            End If
            Return data
        End Function
    End Class
End Namespace
 

 

 

Atanas Korchev
Telerik team
 answered on 13 Jul 2015
1 answer
120 views

I have a grid with multiple ForeignKey columns which work nicely however i'd like to be able to set up some column dependencies.

Is the above possible to have a child ForeignKey column either updated or filtered based on the selected value of the parent ForeignKey column?

Ideally i'd like to call an action on change as the initial data is generated in the controller.

So far I've not been able to find an example that does all of the above.

Thanks

Graeme

Vladimir Iliev
Telerik team
 answered on 13 Jul 2015
1 answer
236 views

Hello,

Is it possible to format the urlTemplate in such a way that we can connect a layer of type Tile to a Web Mapping Server?

The problem seems to be fulfilling the BBOX parameter that the WMS Standard expects.

If not, could you please suggest a suitable work-around one can implement to get the Layers from a WMS integrated?

Regards,

Aaron

T. Tsonev
Telerik team
 answered on 10 Jul 2015
1 answer
125 views

Hi!  I'm wondering how one can upload asynchronously given the following:

     -- Auto upload is false

     -- User clicks an upload button to initiate the upload via ajax WITHOUT doing a form post.

Thanks!

Dimiter Madjarov
Telerik team
 answered on 10 Jul 2015
1 answer
93 views

Is there a way to "Select All" users in the editor popup?

I'm using .AutoClose(false), but that's not enough for the client. They want to select all users.

I'm using editable.TemplateName("CustomEditorTemplate");

Vladimir Iliev
Telerik team
 answered on 10 Jul 2015
1 answer
471 views
Is there a way to remove the top border from the NumericTextBox? I have already removed the spinner but I need the top border gone and any padding.
Plamen Lazarov
Telerik team
 answered on 09 Jul 2015
2 answers
113 views
I tried to upload a zip file through "attach files". But it failed to be uploaded and each time connection were lost in uploading. What is the problem?
york
Top achievements
Rank 1
 answered on 09 Jul 2015
2 answers
214 views
Hi,

I want to edit and display in a kendo window a time property (format HH:mm). 
I started with the Time editor and with a DateTime attribute, but the value to be biended is not displayed in the form.
How can we fix it ?
Apparently the Timepicker supports a TimeSpan value, but Javascript doesn't support Timespan (json serialization problems).
ex : @Html.EditorFor(m => m.StartTime, "Time")

Thanks for your help
Stephane
Top achievements
Rank 1
 answered on 08 Jul 2015
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
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
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?