Hi,
i am working with kendo scheduler and it gives me an error at scheduler event binding except for change event all other events generate me the same error. I created a new sample project with latest kendo version but still struggling with the same issue please refer the attach project and images for more information.
Has anyone ever experienced a grid not getting any of the data-roles applied to the markup when the page loads? This seems to happen randomly, but usually when we open up the Kendo Window that contains the grid very quickly after the page loads.
It almost looks like we are going too quick for Kendo to catch up and create the proper markup.
Has anyone else seen a problem like this?
@(Html.Kendo().Grid<OperMVC.Models.Daily>()
.Name(
"Grid"
)
.Columns(c => {
c.Bound(p => p.Name).Width(150);
c.Bound(p => p.BDayDate).Width(50);
})
.ToolBar(toolbar =>
{
toolbar.Template(
@<div><label>BDate: </label>
@(Html.Kendo().DatePicker()
.Name(
"datepicker"
)
.Events(e => e.Change(
"GetDate"
))
.Value(DateTime.Today)
.Format(
"dd.MM.yyyy"
)
)</div>
);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action(
"ReadBDays"
,
"Person"
).Data(
"filterDate"
))
//.ServerOperation(true)
)
)
function
GetDate() {
var
value =
this
.value();
var
date =
new
Date();
if
(value) {
date.setTime(Date.parse(value));
console.log(date.toLocaleDateString());
}
$(
"#Grid"
).data(
"kendoGrid"
).dataSource.read();
}
function
filterDate() {
var
date = $(
"#datepicker"
).data(
"kendoDatePicker"
).value();
console.log(
"filtered date:"
+ date);
return
{dateString : date}
}
How do you specify an area when binding to a model? I'm working on an ASP.NET MVC website using Areas, and using the Kendo().Menu() helper to build the menu. I'm using the BindTo() method to bind the menu to a model that is based on Kendo.MVC.UI.MenuItem. How do I tell the helper which area (i.e. which route) to use, and how do I specify that a particular controller is NOT in any of the areas. The following example code example might help to illustrate the problem I'm having:
using
System.Collections.Generic;
using
System.Web.Routing;
using
My.Resources.Views.Shared;
using
Kendo.Mvc.UI;
namespace
My.Web.Configuration
{
public
class
MyMenuItem: Kendo.Mvc.UI.MenuItem
{
public
int
Id {
get
;
set
; }
public
IEnumerable<MyMenuItem> SubItems {
get
;
set
; }
}
public
class
MySiteMap
{
public
MySiteMap()
{
MenuItems =
new
List<MyMenuItem>
{
// There is an AccountController in an Area named 'Admin'
// Neither one of the following approaches works. I think I'm close here, but I'm missing something
// new MyMenuItem { Text = "Log In", ControllerName="Account", ActionName="Login", RouteName = "Admin"},
// new MyMenuItem { Text = "Log In", ControllerName="Account", ActionName="Login", RouteValues = new RouteValueDictionary(new {area = "Admin"})},
// The following line works the first time you click on it, but an error occurs the second
// time, or when you try to navigate anywhere else, because the helper appends all links
// to the Area name, once you've navigated to said area (e.g. "Home" becomes "Admin/Home"
// which is incorrect).
new
MyMenuItem { Text = MenuResources.MenuLogin, ControllerName=
"Admin/Account"
, ActionName=
"Login"
},
// How do I tell the Kendo().Menu() helper that the 'Home' controller, e.g., is not located
// in the 'Admin' area?
new
MyMenuItem { Text = MenuResources.MenuAbout, ControllerName=
"Home"
, ActionName=
"About"
},
new
MyMenuItem
{
Text = MenuResources.MenuProjects, ControllerName=
"Projects"
,
ActionName=
"Index"
,
SubItems =
new
List<MyMenuItem>
{
new
MyMenuItem{Text = MenuResources.MenuProjectX, ControllerName=
"Projects"
, ActionName=
"ProjectX"
},
new
MyMenuItem{Text = MenuResources.MenuProjectY, ControllerName=
"Projects"
, ActionName=
"ProjectY"
}
},
},
new
MyMenuItem { Text = MenuResources.MenuNotesToSelf, ControllerName=
"Blog"
, ActionName=
"Index"
}
};
SiteMapName =
"Root"
;
// Never displayed
}
public
string
SiteMapName {
get
;
set
; }
public
IEnumerable<MyMenuItem> MenuItems {
get
;
set
; }
}
}
Hi, in dropDownList widget i can set valueTemplate property to define a custom selected value template.
I need to do the same with comboBox but it does't have valueTemplate property..
How can i do?
Thanks
Hello,
Is is possible to set the height of a row after the databound ?
Let me explain why. Sometimes I have a lot of events and sometimes I don't. So I want to set the height of the row after the databound so I can show all the event in the row. The attached file will clarify my mind I think.
Thanks in advance for your response.