Telerik Forums
UI for ASP.NET MVC Forum
1 answer
101 views
No, not America First. :-) But in my opinion the Razor code examples should be the default code in the documentation. Razor engine is 7 years old now and although I did not do any market research I believe that this is the preferred syntax for ASP.NET MVC developers. I find it a bit annoying that you have to do a mouse click each time to see the correct syntax.
Ivan Danchev
Telerik team
 answered on 05 Mar 2018
1 answer
227 views
Is it possible to disable the built in Kendo validation when editing a Kendo ListView and only use the unobtrusive jQuery validation?  I've got a bunch of custom validation attributes already built and implemented using jQuery validation and it seems redundant to have to re-implement them using the Kendo validation format.
Stefan
Telerik team
 answered on 05 Mar 2018
5 answers
74 views

Hello,

I try to color "isAllDay" event.
The simpliest way for me to do somethiong like this:

// Couleur isAllDay
r.Add(m => m.IsAllDay)
.Title("Supprimé")
.DataTextField("Text")
.DataValueField("Value")
.DataColorField("Color")
.BindTo(new[] {
                new { Text = "Journée", Value = 1 , Color = "red" },
});

 

But it's not working. I also tried Convert.ToBoolean(1), but it the same issues.

Do you have any advice ?

Thank you

Plamen
Telerik team
 answered on 05 Mar 2018
2 answers
187 views

Hi,

 

I've used your custom bindings page (https://demos.telerik.com/aspnet-mvc/grid/customajaxbinding) to help create a view i wanted but i noticed you haven't supplied code to help with the aggregates, can you please supply or is there a reason this hasn't been added?

 

Many thanks,
Lee.

Lee
Top achievements
Rank 1
Veteran
 answered on 02 Mar 2018
1 answer
362 views

HI

There have a problem about PanelBar.ExpandMode(PanelBarExpandMode.Single) : 

When user expand one item then other expanded item will collapse automatically (THIS IS OK),
but when user click the EXPANDED ITEM, that item will not collapse.

How can I collapse the EXPANDED ITEM while PanelBar.ExpandMode(PanelBarExpandMode.Single) ?

Best regards

Chris

 

 

 

Neli
Telerik team
 answered on 02 Mar 2018
5 answers
466 views

I'm attempting to test out how the Telerik (Kendo) grid will work in a current application I have but am running into some roadblocks.

I have a WebApi controller which inherits from ApiController and implements the following "Get" method:

[System.Web.Http.HttpGet, System.Web.Http.Route(LookupUrl.MyLookup)] public DataSourceResult Get([System.Web.Http.ModelBinding.ModelBinder(typeof(WebApiDataSourceRequestModelBinder))]DataSourceRequest request)        

{

            return service.GetModels().ToDataSourceResult(request);

}

and in the .cshtml file I have:

@(Html.Kendo().Grid<MyModel>()           .Name("telerikGrid")           .Columns(col =>           {               col.Bound(c => c.Key);               col.Bound(c => c.DisplayName);               col.Bound(c => c.Inactive);           })           .Scrollable()           .Groupable()           .Sortable()           .Filterable()           .Pageable(pageable => pageable               .Refresh(true)               .PageSizes(true)               .ButtonCount(5))           .DataSource(d =>               d.WebApi()                   .Model(model =>                   {                       model.Id(p => p.Key);                   })                   .Events(events => events.Error("error_handler"))                   .Read(read => read.Url(Url.ApiUrl(LookupUrl.MyLookup)))           )     )

 

The grid shows up correctly on the page, but the controller method is never accessed.  I'm not entirely sure what I am doing wrong here.

Joel
Top achievements
Rank 1
 answered on 02 Mar 2018
1 answer
98 views

I have a set of grids, one acting as a main grid, which is editable, and works fine. 

There is then a detail grid. When the detail grid is set to not editable, by commenting out all editable/command/toolbar sections, it works fine. However, upon including even just one of those, it causes an invalid template error. Code is included below for the two grids. the second one is the one causing the issue. 

 

 

@(Html.Kendo().Grid<eCurriculumAdminJunior.Models.Feedback.Section>()
    .Name("SectionGrid")
    .Columns(col =>
    {
        col.Bound(x => x.position).Title("Section").ClientTemplate("Section #=position#").HtmlAttributes(new { style = "width: 40%" });
        col.Bound(x => x.viewableby).Title("Visibility").EditorTemplateName("VisibleTo").ClientTemplate("#=ArrayToString(data.viewableby)#").HtmlAttributes(new { style = "width: 30%" });
        col.Command(command =>
        {
            command.Edit().IconClass("glyphicon glyphicon-edit").Text(" ").HtmlAttributes(new { style = "text-decoration: none" });
            command.Destroy().IconClass("glyphicon glyphicon-ban-circle").Text(" ").HtmlAttributes(new { style = "text-decoration: none" });
        }).Width("5em").Title(" ");
    })
    .RowAction(row => row.DetailRow.Expanded = true)
    .ToolBar(x => x.Create())
    .Events(x => x.Edit("defaultSectionIndexer"))
    .Editable(x => x.Mode(GridEditMode.InLine))
    
    .DataSource(ds => ds.Ajax()
        .Model(m =>
        {
            m.Id(i => i.id);
            m.Field(f => f.id).DefaultValue(-1).Editable(false);
            m.Field(f => f.position).DefaultValue(-1).Editable(false);

        })
        .Batch(false)
        .ServerOperation(false)
        .Read(r => r.Action("ReadSection", "FeedbackForm", new { formID = Model }))
        .Update(u => u.Action("UpdateSection", "FeedbackForm"))
        .Create(c => c.Action("CreateSection", "FeedbackForm", new { formID = Model }))
        .Destroy(d => d.Action("DeleteSection", "FeedbackForm"))
        .Sort(s => s.Add(x => x.position))
    ).ClientDetailTemplateId("sectionHeaderTemplate")
)
<script id="sectionHeaderTemplate" type="text/kendo">

    <text>Headers</text>
    @(Html.Kendo().Grid<eCurriculumAdminJunior.Models.Feedback.SectionHeader>()
        .Name("SectionHeaderGrid#=id#")
        .Columns(col =>
        {
            col.Bound(c => c.position).Hidden(true);
            col.Bound(c => c.text).EditorTemplateName("RichText").HtmlAttributes(new { style = "width: 60%" });
            col.Bound(c => c.viewableby).Title("Visibility").EditorTemplateName("VisibleTo").ClientTemplate("#=ArrayToString(data.viewableby)#").HtmlAttributes(new { style = "width: 30%" });
            col.Command(command =>
            {
                command.Edit().IconClass("glyphicon glyphicon-edit").Text(" ").HtmlAttributes(new { style = "text-decoration: none" });
                command.Destroy().IconClass("glyphicon glyphicon-ban-circle").Text(" ").HtmlAttributes(new { style = "text-decoration: none" });
            }).Width("5em").Title(" ");
        })
        .ToolBar(t =>
        {
            t.Create();
        })
        .DataSource(ds => ds.Ajax()
        .Model(m =>
        {
            m.Id(id => id.id);
            m.Field(f => f.id).DefaultValue(-1);

        })
        .ServerOperation(false)
        .Read(r => r.Action("ReadSectionHeader", "FeedbackForm", new { sectionID = "#=id#" }))
        .Update(u => u.Action("UpdateSectionHeader", "FeedbackForm"))
        .Create(c => c.Action("CreateSectionHeader", "FeedbackForm",new { sectionID = "#=id#" }))
        .Destroy(d => d.Action("DeleteSectionHeader", "FeedbackForm"))
        ).ToClientTemplate()
    )
    <text>Content</text>
   
</script>

Anita
Top achievements
Rank 1
Iron
 answered on 02 Mar 2018
1 answer
100 views

Hello,

I am trying to implement the Grid / Checkbox selection feature in a grid which is inside a ClientDetailTemplate.

But I am in face of a disturbing issue since the selection is always done in the grid which belongs to the first detail template.

To be clear suppose that we have 2 master grids and 2 childs in their own detail template. Expand both the details of the 2 master grids. Then try to select all the rows of the 2nd nested grid by checking the header. The result is not the expected one because all the rows of the 1st nested grid are selected.

 

Hereafter my shortened view code:

@(Html.Kendo().Grid<SellerViewModel>()                           

    .Name("SellersGrid")

    .Columns(columns =>

    {

                 columns.Bound(p => p.SellerId).Hidden();

                 columns.Bound(e => e.Name);

)

                          .Events(e =>                           {                               e.DataBound("onHostSellersDataBound");                           })                           .Filterable()                           .Pageable(pager => pager.ButtonCount(3))                           .Editable(editable => editable.Mode(GridEditMode.InCell))                           .Sortable(sortable => sortable                               .AllowUnsort(true)                               .SortMode(GridSortMode.MultipleColumn))                           .ClientDetailTemplateId("marketplaces_template")                           .DataSource(dataSource => dataSource                               .Ajax()                               .Read(read => read.Action("GetHostSellers", "CompetitorGroup", new { competitorGroupId = Model.CompetitorGroupId }))                               .Sort(sort => sort.Add("IsSelected").Descending())                               .PageSize(25)                               .Model(model =>                               {                                   model.Id(p => p.UniqueId);                                   model.Field(p => p.SellerId).Editable(false);                                   model.Field(p => p.IsSelected).Editable(true);                                   model.Field(p => p.Name).Editable(false);                                   model.Field(p => p.IsActive).Editable(false);                               })                               .ServerOperation(false))                     )

Preslav
Telerik team
 answered on 02 Mar 2018
1 answer
222 views

Hello, 

I am trying to create a week view for the kendo scheduler, in which the week day columns adjust in width depending on the amount of events for particular major tick. Currently the issue is that if i have more than 1 event per tick the events widths shrink and i can no longer see any relevant information. when my system may produce 10 events per tick all the events are then reduced to thin coloured line.

I've tried setting fixed width and altering widths on data bound, extending the current week view and creating a custom week view from your Implement More Events Button in Week View of Scheduler.

Then i decided to pivot and try stack the events in a similar fashion to boostrap columns but

https://www.telerik.com/forums/horizontal-event-spacing-when-column-has-multiple-events

this thread stated that its not possible to alter events positioning or ordering, is this true?

Is there any direction you can point me in or any advise you can give me?

because im pretty stumped at this point

King regards 

Andy

Plamen
Telerik team
 answered on 02 Mar 2018
2 answers
212 views

Hello,

i have updated to the latest version 2018.1.117 and using theme bootstrap v4

Now there are 2 pagers, see attachment. Is there a way to fix this?

 

Greetings, Oliver

 

Oliver
Top achievements
Rank 1
 answered on 02 Mar 2018
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
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
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?