Hi,
I'm trying to utilise the custom view section of the scheduler but cannot find any documentation regarding how to use it,
So far i've got the view copying the day view as such:
1.
.Views(views =>
2.
{
3.
views.CustomView("CurrentShiftView", a => a.Title("Current Shift"));
4.
views.DayView();
5.
views.WeekView();
6.
views.MonthView();
7.
views.AgendaView();
8.
})
and the template as follows:
1.
var
CurrentShiftView = kendo.ui.DayView.extend({
2.
options: {
3.
selectedDateFormat:
"{0:D} - {1:D}"
,
4.
},
5.
});
However, i'm unable to customise the template at all as none of the options i expected would work in it is not being used.
For example, i'm guessing if we go by the javascript examples, we can set the start time for the day to be startTime: new date(2018 10 10 5 0 0) and the custom view will have 5am as the start time. Doing the above doesn't seem to do what i expect and so am wondering if there's an API or documentation that I can use.
I've also found that clicking on the "Show Full Day" button on the footer moves the view to the "Day" view when the custom view is selected. Is there a way to prevent this from happening?
Thanks
Hi,
I thought my scenario was pretty simple, and should be fairly easy to achieve, but it's turning out to be a bit more complex :(
I have a list of invoices in a grid. Invoices have a capital amount and a fee amount.
The user can select if the client wants to settle(pay) the capital amount, the fee amount, or both.
When the user checks the capital and/or fee amount the settlement amount field is populated accordingly. All information required is in the underlying model data row.
I figured I'd just add some booleans to my model, create some check box columns bound to the booleans, and create some javascript events on change or on click to just set the payment amount based on what was clicked.
However, after much searching on this forum, it seems that I have to use client templates for the checkbox columns. Then when I tried that, I see they're all checked by default, the 'check binding' doesn't appear to work, and not sure exactly what events are fired and when. I can check the checkboxes before I enable inline editing, and when i do enable inline editing, the check box ticking doesn't fire any row changed events but if I click on the open space next to it, the field goes into edit mode then only.
It just feels messy.
I've searched the forums and it seems that there is no clean way to do this: https://www.telerik.com/forums/how-to-have-more-than-one-checkbox-column
I think with another few hours of messing around I can probably get this to work. But my question is:
What is the RECOMMENDED way to get this done?
I need additional checkbox columns. I need an event fired on changed or checked to update another field in the same row.
I will handle posting to the server later on via a button as i need to capture payment dates and references and stuff.
This is how far i got right now, checkboxes are ticked by default even though the model says false for those checkbox fields and the event is not firing at the right time, only at read which is wrong:
@(
Html.Kendo().Grid<
emscredit.Models.Invoice
>()
.Name("active-invoices-" + batch.batch.Id)
.Columns(columns =>
{
columns.Select().Title("Select All").Width(35);
columns.Bound(c => c.InvoiceNo);
columns.Bound(c => c.InvoiceAmount);
columns.Bound(c => c.SettleCapitalAmount).ClientTemplate("<
input
type
=
'checkbox'
\\#= SettleCapitalAmount ?
checked
=
'checked'
:'' \\# />");
columns.Bound(c => c.SettleFeeAmount).ClientTemplate("<
input
type
=
'checkbox'
\\#= SettleFeeAmount ?
checked
=
'checked'
:'' \\# />");
columns.Bound(c => c.TotalSettlement);
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => {
model.Id(i => i.Id);
model.Field(c => c.InvoiceNo).Editable(false);
model.Field(c => c.InvoiceAmount).Editable(false);
})
.Read(read => read.Action("ReadActiveInvoices", "InvoiceGrid", new { batchId = batch.batch.Id }))
.PageSize(20)
.Events(events => events.Change("processReceiptsRowChanged()"))
)
)
Thanks,
Bruce
I have a grid that contains a date. I would like to filter the grid based on a "start date" and an "end date" I can specify Extra(true) to get 2 date pickers in the menu filter. And I can specify "Greater Than or Equal To" and "Less Than or Equal To" as the operators. But what I would like is the first operator to only be "Greater Than or Equal To" and the second operator to only be "Less Than or Equal To" Is there a way to do that?
Thanks,
Dave Shine
Hi,
In my MVC project I used following code to export grid data to Excel file. It worked fine. Now I want add header and footer line into the sheet. Do I have the way to do so? Thanks.
Scenario... My grid has a list of sales people (names, email addresses, etc). I want to assign them to the US, Canada, or both. I envision 2 checkbox columns. At present, I can only use the column.Select() to have Kendo create the checkbox column (along with a "select all" in the header). I'd like to have similar functionality except they can "select all" US, "select all" Cananda, or click both to select all for both countries. The reason for the "select all" is because the person working in the UI may need to assign 1,000 people to one or both countries and I don't want them to have to click that many times.
Are there any other mechanisms to generate multiple checkboxes (plus a "check all" in the header) beyond the column.Select() method?
In short I have replicated the following example:
https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/window/KendoWindow-Ajax-Form
And it works just fine. Only difference is the new row is added in it's correct spot in the grid, and not on the top as per usual. How can I, using the example linked to, place the new row on the top?
Hi,
Is there a simple way to view more detail around what is causing an issue with a client template?
I have a situation where I have a grid, and I want a child grid in the detail, but when i call render all i get is an error in Chrome saying "Invalid Template" and a bunch of gumpf after that.
Thanks,
Bruce
Hi,
In my MVC project, I copied sample code(See below example)
in my Index.cshtml file. I did not write server side function Excel_Export_Save() anywhere. Why below setting still worked in
my project?
Furthermore, I
changed "Excel_Export_Save" to other things, it still worked.
What is the meaning of “.ProxyURL(Url.Action("Excel_Export_Save",
"Grid"))” then? Thanks.
…
.Excel(excel
=> excel
.FileName("Kendo
UI Grid Export.xlsx")
.Filterable(true)
.ProxyURL(Url.Action("Excel_Export_Save",
"Grid"))