Jul 21, 2015, 8:39 AM
[CLOSED] Error with fix for #832
I've just implemented the fix you provided for #832 in another application and it's producing an error whether I have SingleExpand set to true or false.
The difference in this application is that I am invoking the RowExpander using a Loader
The difference in this application is that I am invoking the RowExpander using a Loader
Html.X().RowExpander().SingleExpand(true)
.Loader(Html.X().ComponentLoader()
.Url(Url.Action("GetGrid"))
.Mode(LoadMode.Component)
.LoadMask(mask => mask.ShowMask = true)
.Params(new { id = JRawValue.From("this.record.getId()") })
)
The Loader code is: public ActionResult GetGrid(string id)
{
int intID = int.Parse(id);
GridPanel grid = new GridPanel
{
Height = 200,
EnableColumnHide = false,
Store = { new Store
{
Model = { new Model {
IDProperty = "ID",
Fields = {
new ModelField("ID"),
new ModelField("DateIncurred",ModelFieldType.Date),
new ModelField("Code"),
new ModelField("Description"),
new ModelField("PurchaseCost",ModelFieldType.Float)
}
}
},
DataSource = projects.Costs.Where(cst => cst.PaymentID == intID).Select(cst => new {cst.DateIncurred, cst.Description, cst.Category.Code, cst.PurchaseCost}).OrderByDescending(cst => cst.DateIncurred)
}
},
ColumnModel =
{
Columns = {
new DateColumn { Text = "Date", DataIndex = "DateIncurred", Flex = 14, Format = "dd/MM/yyyy"},
new Column { Text = "Code", DataIndex = "Code", Flex = 6 },
new NumberColumn { Text = "Cost", DataIndex = "PurchaseCost" , Flex = 10, Format = "£#,###.00", Align = Alignment.Right },
new Column { Text = "Description", DataIndex = "Description", Flex = 70 }
}
},
};
return this.ComponentConfig(grid);
}
When I try to open the view I get this:
Last edited by Daniil; Jul 28, 2015 at 9:35 PM.
Reason: [CLOSED]