Hi,
My jobs are loading properly in the scheduler. And creating a job by double clicking on the scheduler and save from the popup is OK. But the problem is when I open the the newly created job and click Cancel button, nothing happens. I checked on the browser console. Error is "Uncaught TypeError: Cannot read property 'uid' of undefined"
In my case, "Job 101", "Job 102", "Job 103", "Job 104" are loading from back end. Suppose, I have just created a new job titled "Job 105" and when I open the job again by double clicking and click on Cancel button, error occurs, "Uncaught TypeError: Cannot read property 'uid' of undefined"
What am I doing wrong here?
@(Html.Kendo().Scheduler<TaskViewModel>() .Name("schedulerVertical") .Date(new DateTime(2015, 5, 27)) .StartTime(new DateTime(2015, 5, 27, 7, 00, 00)) .Height(600) .Views(views => { views.DayView(); views.WeekView(); views.MonthView(); views.TimelineView(t => t.Selected(true)); }) .Timezone("Etc/UTC") .Group(group => group.Resources("Techs").Orientation(SchedulerGroupOrientation.Vertical)) .Resources(resource => { resource.Add(m => m.TechID) .Title("Techs") .Name("Techs") .DataTextField("TechName") .DataValueField("TechID") .DataSource(d => d.Read("Techs", "Scheduler")); }) .DataSource(d => d .Model(m => { m.Id(r => r.TaskID); m.Field(r => r.TechID); }) .Read("Vertical_Read", "Scheduler") ))
public ActionResult Techs(){ List<Tech> techs = new List<Tech> { new Tech { TechName = "Jack", TechID = 1, Color = "#6eb3fa" }, new Tech { TechName = "Lochlan", TechID = 2, Color = "#f58a8a" }, new Tech { TechName = "Arefin", TechID = 3, Color = "#0583fa" }, new Tech { TechName = "Faisal", TechID = 4, Color = "#9635a0" } }; return Json(techs, JsonRequestBehavior.AllowGet);}
public ActionResult Vertical_Read([DataSourceRequest] DataSourceRequest request){ List<TaskViewModel> tasks = new List<TaskViewModel> { new TaskViewModel { TaskID = 1, TechID = 2, Title = "Job 101", Start = new DateTime(2015, 5, 27, 20, 00, 00), End = new DateTime(2015, 5, 27, 20, 30, 00), Description = "Description 101", IsAllDay = false }, new TaskViewModel { TaskID = 2, TechID = 1, Title = "Job 102", Start = new DateTime(2015, 5, 27, 21, 00, 00), End = new DateTime(2015, 5, 27, 21, 30, 00), Description = "Description 102", IsAllDay = false }, new TaskViewModel { TaskID = 3, TechID = 3, Title = "Job 103", Start = new DateTime(2015, 5, 27, 20, 00, 00), End = new DateTime(2015, 5, 27, 20, 30, 00), Description = "Description 103", IsAllDay = false }, new TaskViewModel { TaskID = 4, TechID = 4, Title = "Job 104", Start = new DateTime(2015, 5, 25, 1, 00, 00), End = new DateTime(2015, 5, 25, 1, 30, 00), Description = "Description 104", IsAllDay = true } }; return Json(tasks.ToDataSourceResult(request));}
Thanks in advance.
Hi,
Can't figure out how to format a DateTimePicker dynamically in a grid.
Sample:
@(Html.Kendo().Grid<TheViewModel>() .Name("aGrid") .ToolBar(toolbar => toolbar.Create()) .Columns(c => { c.Bound(e => e.ID); c.Bound(e => e.Decimal).Format("{0:n5}"); c.Bound(e => e.Stamp); c.Command(command => { command.Edit(); }); }) .Selectable(p => p.Mode(GridSelectionMode.Single)) .Editable(editable => editable.Mode(GridEditMode.InLine)) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(true) .Model(model => model.Id(e => e.ID)) .Create(create => create.Action("create", "Home")) .Read(read => read.Action("read", "Home")) .Update(update => update.Action("update", "Home")) ))
c.Bound(e => e.Stamp).Format("{0:#=kendo.culture().calendar.patterns.d#}");
Thanks
HI
Is there have a learning video forTelerik Reporting + MVC 5 (MVC 5, not MVC 4) like this :
Using Telerik Reporting in ASP.NET MVC 4 projects
https://www.youtube.com/watch?v=U2ZC9W9FYS0fs
The content of this old video is not works for MVC 5 (View Engine options for ASPX/Razor was removed).
Best regards
Chris
I need to provide a Button like 'Add new record' on Grid. On Click of that Button I need to display a Popup with displays rows from database in Grid. On selection of any row from Popup Grid I need to add that row to the Main Grid.
Please suggest me.
is it possible to call a Jquery/Javascript function from an update section of a grid ?
i want to perform some actions before calling the controller method, My code looks like below. Please help me
dataSource: new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl + "/Products",
dataType: "jsonp"
},
update: {
url: crudServiceBaseUrl + "/Products/Update", // instead of URL i want to call a custom Javascript function here
dataType: "jsonp"
},
},
Hello, I'm currently evaluating the controls for a project. I'm currently able to display the grid and filter using regular filtering on the table. I want to create a custom area in the page, using a collapsible panel where I add some textboxes and dropdown controls. I want to use that panel to filter the grid. I haven't been successful yet. I understand that this can be done with js. Are there any samples for a use like this?
Thanks for any help.
Hello,
I have a problem in my grid, when i export to a excel file if i have filtered with a string that have spaces i lost the pagesize and i don't see data. The excel file is created but is empty. Only pass when i put in the filter a string with spaces.
Any idea?
I am trying to use the grid with a colorpicker to set a colorcode property on my model and even so the column is bound, I can never see the updated code when the model is sent to the controller. I am using the standard in line editing function of the grid. (which manages to update teh model for simple properties.
CSHTML
@(Html.Kendo().Grid<Tetral.Services.Entities.AllocationPortfolioEntity>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.ColourCode).Title("Colour").Width("84px").ClientTemplate("<span style='display: inline-block; width: 100%; height: 100%; background-color: #= ColourCode #'> </span>");
columns.Command(m =>
{
m.Edit();
m.Destroy();
}).Width(260);
})
.HtmlAttributes(new { style = "height:850px;width:100%" })
.BindTo(@Model)
.Scrollable(scr => scr.Enabled(true))
.DataSource(dataSource => dataSource
.Ajax()
.Model(m => m.Id(p => p.Id))
.Create(update => update.Action("AllocationPortfolioInsert", "DataManagement"))
.Update(update => update.Action("AllocationPortfolioUpdate", "DataManagement"))
.Destroy(update => update.Action("AllocationPortfolioDelete", "DataManagement"))
)
TEMPLATE
@model string
@(Html.Kendo().ColorPickerFor(m => m)
//.Palette(ColorPickerPalette.Basic)
.Name("ColourPicker")
.Events(e => e.Change("colourPickerChange"))
)
MODEL
private string colourCode;
[UIHint("ColourPicker")]
public string ColourCode
{
get { return colourCode; }
set { this.colourCode = newValue;}
}
The control manages to bind and show the value from my model, but when I submit the form, the model in my controller does not show the updated value from the editor.
I have tried using a normal @Html.EditorFor() and this works as expected. (ie I see the updated value)
@model GeneralDisclosureEntity
@using (Html.BeginForm("GeneralDisclosureTextUpdate", "DataManagement", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div hidden="hidden">
@Html.EditorForModel()
</div>
@(Html.Kendo().EditorFor(m => m.HTML)
.Name("Content")
.HtmlAttributes(new { style = "width:100%;height:440px" })
.Encode(false)
.Tools(t => t.Clear()
.Bold()
.Italic()
.Underline()
.Strikethrough()
.JustifyLeft()
.JustifyCenter()
.JustifyRight()
.JustifyFull()
.InsertUnorderedList()
.InsertOrderedList()
.Indent()
.Outdent())
)
<br />
<button id="btnSubmit3" type="submit" style="float:right")>Save Text</button>
}