Jun 27, 2013, 1:25 PM
[CLOSED] Javascript error in component column having textfield as component of gridpanel
Hi,
I am using simple gridpanel with component columns having textfields as components.
Following javascript error is displaying when I enter something in first textfield and pressing tab button.
Following code might help you to reproduce the problem:
View :
I am using simple gridpanel with component columns having textfields as components.
Following javascript error is displaying when I enter something in first textfield and pressing tab button.
Following code might help you to reproduce the problem:
View :
@{
ViewBag.Title = "RazorGrid";
}
@(Html.X().ResourceManager(ViewBag.ManagerConfig as MvcResourceManagerConfig))
@(Html.X().GridPanel()
.ID("Grid")
.PaddingSpec("1 1 1 1")
.Header(false)
.Border(false)
.Store(Html.X().Store().ID("UserStore")
.RemotePaging(true)
.PageSize(20)
.Model(Html.X().Model().ID("recModel")
.Fields(
new ModelField("ID",ModelFieldType.Int),
new ModelField("FirstName", ModelFieldType.String),
new ModelField("LastName", ModelFieldType.String)
)
)
.DataSource(Model)
)
.ColumnModel(
Html.X().Column().Text("Talent ID").DataIndex("TalentID").Flex(1).Hidden(true),
Html.X().Column().Text("First Name").DataIndex("FirstName"),
Html.X().Column().Text("Last Name").DataIndex("LastName"),
Html.X().ComponentColumn()
.Component(Html.X().TextField().Text("Component")),
Html.X().ComponentColumn()
.Component(Html.X().TextField().Text("Comment"))
)
.SelectionModel(Html.X().CheckboxSelectionModel()
.Mode(SelectionMode.Multi).ID("SelectionBox")
.CheckOnly(true)
)
.BottomBar(
Html.X().PagingToolbar()
)
)
Controller:public ActionResult RazorGrid() {
return View(GridModel.GetAllDetails());
}
Model: public class GridModel
{
public static IEnumerable GetAllDetails()
{
return new object[]
{
new object[] { 1,"John","Player" },
new object[] {2,"Mic","Dsena" },
new object[] { 3,"Linda","Daizy" }
};
}
}
Last edited by Baidaly; Jun 27, 2013 at 11:35 PM.
Reason: [CLOSED]