Currently the Grid performs wonderfully as (pseudo coded the >> is the toggle button to hide/show the group).
>> Group1
Group1 - Row 1
Group1 - Row 2
>> Group2
Group2 - Row 1
Group2 - Row 2
>> Group3
Group3 - Row 1
Is it possible to remove the "t-grouping-row" and instead just have
>> Group1 - Row 1
Group1 - Row 2
>> Group2 - Row 1
Group2 - Row 2
Group3 - Row 1
Group3 - Row1 has no toggle since it's only 1 member.
The reason why is the client doesn't like the Group Row and would rather just see the full row entry as it is, but with the toggle there.
Hi all.
I'd like to display a preview of the image the user selected to upload. Problem is: I can't find the complete file path to insert into an img-tag.
How can I access the file path(s) of the selected file(s)?
Kind regards
I'm using ASP.NET Web API 5.2.3, and I'm having problems getting the DataSourceRequest to work properly. I followed the instructions at http://docs.telerik.com/kendo-ui/web/grid/how-to/web-api-server-operations but it appears paging and filtering options are not coming through with the request. Is the information on that page still valid for current releases?
Thanks,
Joel
I'm having some issues when it comes to scrolling the scheduler vertically in mobile when using the Mobile(MobileMode.-tablet/phone etc-).
The scheduler seems to be overriding something in the mobile browser (android, chrome) causing the scrolling to not work. I've pasted a snippet below. Scrolling works when the mobile mode is off, but if the mobile mode is off i can't create any events due to the mobile not having "double"-clicks.
01.
@(Html.Kendo().Scheduler<CalendarModel>().Name(
"scheduler"
)
02.
.Date(DateTime.Today)
03.
.StartTime(DateTime.Today.AddHours(8))
04.
.EndTime(DateTime.Today.AddHours(20))
05.
.WorkDayStart(DateTime.Today.AddHours(8))
06.
.WorkDayEnd(DateTime.Today.AddHours(20)).AllDaySlot(
false
)
07.
.Min(DateTime.Today).Selectable(
false
)
08.
.Events(e =>
09.
{
10.
e.DataBinding(
"data_binding"
);
11.
e.Add(
"scheduler_add"
);
12.
e.Save(
"scheduler_save"
);
13.
})
14.
.Views(views =>
15.
{
16.
views.DayView();
17.
views.WeekView();
18.
views.MonthView();
19.
views.AgendaView();
20.
}).Editable(e => e.TemplateId(
"customEditorTemplate"
).Move(
false
).Create(
true
).Resize(
false
).Update(
false
).Destroy(
false
)).BindTo(Model).DataSource(d => d.Model(m =>
21.
{
22.
m.Id(f => f.Id);
23.
m.Field(f => f.Title).DefaultValue(
"No title"
);
24.
m.Field(f => f.RoomId);
25.
m.Field(f => f.ErrorMessage);
26.
})
27.
.Create(
"Create"
,
"CreateEvent"
)
28.
).Mobile(MobileMode.Auto))
Hi
I have a sum-row in my grid and I want to do a calculation with a fixed value from my database
So, passing it via the ViewModel won't work, has anyone a suggestion other than sending the value with each row of the dataset?
.ClientFooterTemplate("<div class=\"total_sum\">" + @Labels.Total + ": #= sum # = #= sum * [INSERT VALUE HERE] # €</div>");
Kind regards
Florian
I evaluating your component.
I need to retrive filtered data with custom filter into custom header with refresh button click
Client:
.Pageable(p => p.Refresh(true))
.Sortable()
.Selectable()
.Scrollable(scrollable => scrollable.Height(30))
.Filterable()
.HtmlAttributes(new { style = "height:550px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(model => model.Id(p => p.Id))
.ServerOperation(true)
.Read(create => create.Action("IncomingRead", "Grid", new { topRow = ""}))
)
Server:
public ActionResult IncomingRead([DataSourceRequest]DataSourceRequest request)
{
string virtualPath = "";
var customerWhereCondition = "";
var userIdWhereCondition = "";
var versionNumberWhereCondition = "";
var json = Helper.GetDataFromDb(virtualPath, 100, "-1", customerWhereCondition,
userIdWhereCondition, versionNumberWhereCondition, new DateTime(2015, 4, 1), DateTime.Now);
return Json(json.ToDataSourceResult(request));
}
how to set filter into request object(client) and get filter into the server for execute new query?
thankyou in advance.
Regards,
Flavio
I want to have a MultiSelect with a default value (the name of the current user), but I also do not want to bind the data as there are far too many users to load at once.
How can I have both? Currently, the default value overrides the pre-select value.
http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/multiselect/overview#pre-select-values-on-initial-loading​
Hi, I'm in the middle of evaluating if I'm going to switch to Telerick (currently using DevExpress) and one of the control that is critical to my project is (what they call) the GridLookup. Essentially it's a combox which the user pulls down, showing a grid from which rows can be (multi)selected http://demos.devexpress.com/MVCxGridViewDemos/GridLookup/MultiSelect
It needs to be available for MVC (not ajax) and needs to be able to bind to SignalR. I don't know if that matters but I'm using VS 2013, ASP.NET (MVC), C#.
I've played around with the multi-select and a custom multi-columns combobox but they lack the grid's extra capabilities (such as grouping, filtering, sorting, etc..).
Any chance I can get to the same result (or close) using Telerik's component(s)?
Thank you :)
I cant seem to find where I am going wrong with this, i'm not seeing any javascript errors.
My update action is not being called. I notice that the Update button of the grid row takes 4-5 seconds to return to an edit. This grid is loaded via jquery load into a div.
Here is the grids cshtml:
@model PathologyScheduling.Models.TaskScheduleViewModel
@using PathologyScheduling.Models;
@( Html.Kendo().Grid<PathologyScheduling.Models.TaskScheduleViewModelRecord>(Model.Records)
.Name("TaskScheduleGrid")
.Editable(editable =>
{
editable.Mode(GridEditMode.InLine);
})
.ToolBar(tools => tools.Pdf())
//.Scrollable()//scrolling => scrolling.Enabled(true).Virtual(false))
.Resizable(r => r.Columns(true))
.ColumnResizeHandleWidth(10)
.HtmlAttributes(new { style = " width: 100%" })
.Pdf(pdf => pdf
.AllPages().Landscape()
.FileName("TaskSchedule_" + @Model.SelectedScheduleId + ".pdf")
.ProxyURL(Url.Action("Pdf_Export_Save", "Home")))
.Columns(x =>
{
x.Command(item => item.Edit());
x.Bound(item => item.Date).Format(@"{0:ddd (dd)}")
.Title("Date").Locked(true);
x.Bound(item => item.Value)
.Title("FTE");
x.Bound(item => item.SingleDay)
.ClientTemplate("#= renderMultiSelect(data.SingleDay) #")
.EditorTemplateName("StaffListSingleDay")
.Title(TaskScheduleViewModelRecord.Constants.SingleDay);
x.Bound(item => item.HalfDay)
.ClientTemplate("#= renderMultiSelect(data.HalfDay) #")
.EditorTemplateName("StaffListHalfDay")
.Title(TaskScheduleViewModelRecord.Constants.HalfDay);
x.Bound(item => item.Gross)
.ClientTemplate("#= renderMultiSelect(data.Gross) #")
.EditorTemplateName("StaffListGross")
.Title(TaskScheduleViewModelRecord.Constants.Gross);
x.Bound(item => item.LightMicroscopy)
.ClientTemplate("#= renderMultiSelect(data.LightMicroscopy) #")
.EditorTemplateName("StaffListLightMicroscopy")
.Title(TaskScheduleViewModelRecord.Constants.LightMicroscopy);
x.Bound(item => item.Pool2X)
.ClientTemplate("#= renderMultiSelect(data.Pool2X) #")
.EditorTemplateName("StaffListPool2X")
.Title(TaskScheduleViewModelRecord.Constants.Pool2X);
x.Bound(item => item.Pool15X)
.ClientTemplate("#= renderMultiSelect(data.Pool15X) #")
.EditorTemplateName("StaffListPool15X")
.Title(TaskScheduleViewModelRecord.Constants.Pool15X);
x.Bound(item => item.Pool1X)
.ClientTemplate("#= renderMultiSelect(data.Pool1X) #")
.EditorTemplateName("StaffListPool1X")
.Title(TaskScheduleViewModelRecord.Constants.Pool1X);
x.Bound(item => item.Pool075X)
.ClientTemplate("#= renderMultiSelect(data.Pool075X) #")
.EditorTemplateName("StaffListPool075X")
.Title(TaskScheduleViewModelRecord.Constants.Pool075X);
x.Bound(item => item.Pool05X)
.ClientTemplate("#= renderMultiSelect(data.Pool05X) #")
.EditorTemplateName("StaffListPool05X")
.Title(TaskScheduleViewModelRecord.Constants.Pool05X);
x.Bound(item => item.Pool025X)
.ClientTemplate("#= renderMultiSelect(data.Pool025X) #")
.EditorTemplateName("StaffListPool025X")
.Title(TaskScheduleViewModelRecord.Constants.Pool025X);
x.Bound(item => item.Gyne1X)
.ClientTemplate("#= renderMultiSelect(data.Gyne1X) #")
.EditorTemplateName("StaffListGyne1X")
.Title(TaskScheduleViewModelRecord.Constants.Gyne1X);
x.Bound(item => item.Gyne05X)
.ClientTemplate("#= renderMultiSelect(data.Gyne05X) #")
.EditorTemplateName("StaffListGyne05X")
.Title(TaskScheduleViewModelRecord.Constants.Gyne05X);
x.Bound(item => item.Gyne025X)
.ClientTemplate("#= renderMultiSelect(data.Gyne025X) #")
.EditorTemplateName("StaffListGyne025X")
.Title(TaskScheduleViewModelRecord.Constants.Gyne025X);
x.Bound(item => item.NonG)
.ClientTemplate("#= renderMultiSelect(data.NonG) #")
.EditorTemplateName("StaffListNonG")
.Title(TaskScheduleViewModelRecord.Constants.NonG);
x.Bound(item => item.HEM)
.ClientTemplate("#= renderMultiSelect(data.HEM) #")
.EditorTemplateName("StaffListHEM")
.Title(TaskScheduleViewModelRecord.Constants.HEM);
x.Bound(item => item.Sturgeon)
.ClientTemplate("#= renderMultiSelect(data.Sturgeon) #")
.EditorTemplateName("StaffListSturgeon")
.Title(TaskScheduleViewModelRecord.Constants.Sturgeon);
x.Bound(item => item.Biochemistry)
.ClientTemplate("#= renderMultiSelect(data.Biochemistry) #")
.EditorTemplateName("StaffListBiochemistry")
.Title(TaskScheduleViewModelRecord.Constants.Biochemistry);
x.Bound(item => item.Dermpath)
.ClientTemplate("#= renderMultiSelect(data.Dermpath) #")
.EditorTemplateName("StaffListDermpath")
.Title(TaskScheduleViewModelRecord.Constants.Dermpath);
x.Bound(item => item.Colpos)
.ClientTemplate("#= renderMultiSelect(data.Colpos) #")
.EditorTemplateName("StaffListColpos")
.Title(TaskScheduleViewModelRecord.Constants.Colpos);
x.Bound(item => item.Liver)
.ClientTemplate("#= renderMultiSelect(data.Liver) #")
.EditorTemplateName("StaffListLiver")
.Title(TaskScheduleViewModelRecord.Constants.Liver);
x.Bound(item => item.QACytology)
.ClientTemplate("#= renderMultiSelect(data.QACytology) #")
.EditorTemplateName("StaffListQACytology")
.Title(TaskScheduleViewModelRecord.Constants.QACytology);
x.Bound(item => item.QAHistology)
.ClientTemplate("#= renderMultiSelect(data.QAHistology) #")
.EditorTemplateName("StaffListQAHistology")
.Title(TaskScheduleViewModelRecord.Constants.QAHistology);
x.Bound(item => item.ResidencyTraining)
.ClientTemplate("#= renderMultiSelect(data.ResidencyTraining) #")
.EditorTemplateName("StaffListResidencyTraining")
.Title(TaskScheduleViewModelRecord.Constants.ResidencyTraining);
})
.Selectable()
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Date).Editable(false);
model.Field(p => p.Value).Editable(false);
model.Field(p => p.SingleDay).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.HalfDay).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Gross).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.LightMicroscopy).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Pool2X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Pool15X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Pool1X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Pool075X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Pool05X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Pool025X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Gyne1X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Gyne05X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Gyne025X).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.NonG).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.HEM).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Sturgeon).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Biochemistry).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Dermpath).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Colpos).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.Liver).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.QACytology).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.QAHistology).Editable(true).DefaultValue(new List<SelectListItem>());
model.Field(p => p.ResidencyTraining).Editable(true).DefaultValue(new List<SelectListItem>());
})
.Update(update => update.Action("UpdateTaskSchedule", "Home").Type(HttpVerbs.Post))
.Read(read => read.Action("TaskSchedule", "Home", @Model.SelectedScheduleId))
)
)
<script>
function renderMultiSelect(selectListArray) {
if (selectListArray != undefined && selectListArray[0] != undefined) {
var displayText;
$.each(selectListArray, function (index) {
if (displayText == undefined) {
displayText = selectListArray[index].Text + ', ';
}
else {
displayText = displayText + selectListArray[index].Text + ', ';
}
});
return displayText.slice(0, -2);
}
else {
return "";
}
}
function TaskScheduleRefreshGrid(e) {
debugger;
var grid = $("#TaskScheduleGrid").data("kendoGrid");
grid.dataSource.read({ "id": $("#TaskScheduleIdSelector").val() });
}
</script>
I have an editor template for most of the columns which is the same for most of the records:
@model List<SelectListItem>
@(Html.Kendo().MultiSelectFor(x=>@Model)
.Name("StaffListBiochemistry")
.BindTo((System.Collections.IEnumerable)ViewData["Staff"])
.DataTextField("Text")
.DataValueField("Value")
)