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
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.
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
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.
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>
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)) )
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
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