6
« Last post by pbassey on February 17, 2025, 10:11:48 pm »
I have the following column model definition:
colModel: [
{ dataIndx: 'KeyRec', title: 'KeyRec', hidden: true, editable: false },
{ dataIndx: 'ActivityYear', title: 'ActivityYear', hidden: true, editable: false },
{ dataIndx: 'grp', title: 'ActivityId', tpHide: true, editable: false, menuInHide: true, minWidth: 150 },
{ dataIndx: "ActivityId", title: "FAS Activity", editable: false, hidden: true, filter: { groupIndx: 'Region' } },
{ dataIndx: "Project", title: 'Project Code', valign: "top", editable: false, valign: "top", minWidth: 110 },
{ dataIndx: "Source", title: 'Source', valign: "top", editable: false, valign: "top", minWidth: 70 },
{ dataIndx: "ProjBud", title: 'Project Budget', valign: "top", format: '$ #,###,###.00', editable: false, summary: { type: "sum" }, valign: "top", align: "right", minWidth: 100 },
{
dataIndx: "YTD_Tot", title: 'YTD Through<br>@lastMonthName', halign: "center", valign: "top", format: '$ #,###,###.00',
editable: false, summary: { type: "sum" }, valign: "top", align: "right", minWidth: 100,
//render: function (ui) {
// var ActivityID = ui.rowData.ActivityId;
// return "<a href='#' onClick=javascript:OpenTranWindow(" + "'" + ActivityID + "'" + ");>" + ui.cellData + "</a>";
//}
},
{
title: "Projection Months", align: "center", collapsible: { last: true, on: false },
colModel: [
@foreach (var month in months)
{
@: { dataIndx: "@month.DataIndx", title: '@month.Title', editor: { type: 'textbox', attr: 'maxlength="12"' }, valign: "top", format: '$ #,###,###.00', editable: true, summary: { type: "sum" }, valign: "top", align: "right", minWidth: 90 },
}
{ dataIndx: "RegTotal", title: 'Total<br>Projections', halign: "center", valign: "top", format: '$ #,###,###.00', editable: false, summary: { type: "sum" }, valign: "top", align: "right", minWidth: 100 },
]
},
{ dataIndx: "RegBudget", title: 'Total<br>Projections<br>Spent', halign: "center", valign: "top", format: '$ #,###,###.00', editable: false, summary: { type: "sum" }, valign: "top", align: "right", minWidth: 90 },
{ dataIndx: "curMonAct", title: 'February<br>Actual', halign: "center", valign: "top", format: '$ #,###,###.00', editable: false, summary: { type: "sum" }, valign: "top", align: "right", minWidth: 90 },
],
When I remove the comments on the YTD_Tot col and click on the link, I get the message:
Uncaught use Group().option() method to set groupModel options.
Can you tell me how the "Render" function could be coded?