.EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing(); })
.ToolbarSettings(toolbar =>
{
toolbar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.Add);
items.AddTool(ToolBarItems.Edit);
items.AddTool(ToolBarItems.Delete);
items.AddTool(ToolBarItems.Update);
items.AddTool(ToolBarItems.Cancel);
});
})
.AllowMultiSorting()
.AllowFiltering()
.AllowPaging()
.AllowGrouping()
.EnableHeaderHover()
.AllowResizing()
.AllowTextWrap(true)
.FilterSettings(filter => { filter.FilterType(FilterType.Excel); })
.GroupSettings(group => { group.GroupedColumns(col => { col.Add("SiteId"); col.Add("ServiceTypeId"); }); })
.PageSettings(page => { page.PageSize(20); })
.Locale("it-IT")
.SummaryRow(row =>
{
row.Title("Totale").SummaryColumns(col => { col.SummaryType(SummaryType.Sum).Format({0:C}").DisplayColumn("TotalAmount").DataMember("TotalAmount").Add(); }).Add();
row.Title("Totale Attivi").SummaryColumns(col => { col.SummaryType(SummaryType.Custom).Format("{0:C}").DisplayColumn("TotalAmount").CustomSummaryValue("sumActiveContracts").Add(); }).Add();
})
.Columns(col =>
{
col.Field("ContractId").HeaderText("ID Offerta").TextAlign(TextAlign.Center).Width(0).Visible(false).Add();
col.Field("ContractCode").HeaderText("Codice").TextAlign(TextAlign.Center).Width(50).Add();
col.Field("RenewalNum").HeaderText("Rinn.").TextAlign(TextAlign.Center).Width(10).Add();
col.Field("SiteId").HeaderText("Sede Lavori").ForeignKeyField("SiteId").ForeignKeyValue("SiteDesc").DataSource((IEnumerable<object>)ViewBag.Sites).HeaderTextAlign(TextAlign.Center).Width(150).Add(); col.Field("ServiceTypeId").HeaderText("Servizio").ForeignKeyField("ServiceTypeId").ForeignKeyValue("ServiceTypeDesc").DataSource((IEnumerable<object>)ViewBag.ServiceTypes).HeaderTextAlign(TextAlign.Center).TextAlign(TextAlign.Center).Width(40).Add();
col.Field("ServiceId").HeaderText("Contro").ForeignKeyField("ServiceId").ForeignKeyValue("ServiceDesc").DataSource((IEnumerable<object>)ViewBag.Services).HeaderTextAlign(TextAlign.Center).TextAlign(TextAlign.Center).Width(40).Add();
col.Field("EndDate").HeaderText("Scadenza").TextAlign(TextAlign.Center).Format("{0:dd/MM/yyyy}").Width(30).Add();
col.Field("TotalAmount").HeaderText("Costo Totale").TextAlign(TextAlign.Right).Format("{0:c2}").Width(30).Add();
col.Field("QuoteSimulationId").HeaderText("Commessa").HeaderTextAlign(TextAlign.Center).Template("<img style='width: 16px; height: 16px' src='../../images/Flags/imgBudget_{{:QuoteSimId ? 'true' : 'false'}}.png' alt='imgBudget_{{:QuoteSimId ? 'true' : 'false'}}.png' />").TextAlign(TextAlign.Center).Width(10).Add();
})
.ChildGrid(d =>
{
d.Datasource(ds => ds.Json((IEnumerable<Work>
) ViewBag.Works))
.QueryString("ContractId")
.Columns(col =>
{ col.Field("ContractId").HeaderText("ContractId").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Visible(false).Add();
col.Field("WorkCode").HeaderText("Codice").Width(100).Add();
col.Field("WorkYear").HeaderText("Anno").TextAlign(TextAlign.Center).Width(10).Add();
col.Field("WorkMonth").HeaderText("Mese").TextAlign(TextAlign.Center).Width(10).Add();
col.Field("WorkPlanningDate").HeaderText("Data Pianif.").TextAlign(TextAlign.Center).Format("{0:dd/MM/yyyy}").Width(20).Add();
col.Field("WorkRegisterDate").HeaderText("Data Registr.").TextAlign(TextAlign.Center).Format("{0:dd/MM/yyyy}").Width(20).Add();
});
})
.ClientSideEvents(eve => {
eve.ActionComplete("complete").ActionBegin("begin").EndEdit("endEdit").EndAdd("endAdd");
eve.QueryCellInfo("formattingCell");
eve.RecordClick("onContractRecordClick");
})
)
every row changes its color. I need something different. Every grouping row with a different color
Thanks.