Feb 09, 2024, 10:24 PM
Nested GridPanel issue
The nested grid panel's header-columns do not align with the rows (could not attach screenshot)
// Creates the Trailer level grid panel
GridPanel grid = new GridPanel
{
HideHeaders = false,
//SyncRowHeight=false,
//Cls = "x-grid-row-summaryr",
//Height = 300, //this will auto size if not set, but if left expanded may not appear correctly until it is collapsed
Border = true,
PaddingSpec = "5 0 0 0", Scrollable = ScrollableOption.Both, AnchorVertical = "90%", AnchorHorizontal = "100%", Width = 1800,
EnableColumnHide = false,
Store =
{
new Store
{
Model = {
new Model {
// remember to set an ID property for additional drill downs
IDProperty = "FDR_SCH_ACY_SEQ_NR",
Fields =
{
new ModelField("FDR_SCH_ACY_SEQ_NR"),
new ModelField("LD_CRT_DT"),
new ModelField("DOW_CD_MNM_TE"),
new ModelField("SEG_SCH_LCL_DPT_TM"),
new ModelField("SEG_ACT_LCL_DPT_TM"),
new ModelField("FS_JOB_NR"),
new ModelField("FS_LD_NR"),
new ModelField("EQP_ASN_NR"),
new ModelField("LOAD_NAME"),
new ModelField("LD_ORG_OGZ_NR"),
new ModelField("PLN_ORG_SRT_TYP_CD"),
new ModelField("ACT_ORG_SRT_TYP_CD"),
new ModelField("LD_DTN_OGZ_NR"),
new ModelField("LD_DTN_SRT_TYP_CD"),
new ModelField("MVM_SEG_SCH_EQP_CD"),
new ModelField("SEG_ACT_EQP_TYP_CD"),
new ModelField("SCH_EQP_CBU_CAP_QY"),
new ModelField("ACT_EQP_CBU_CAP_QY"),
new ModelField("LD_PKG_VOL_FCS_PR"),
new ModelField("SCH_CUB_UTL_PCT"),
new ModelField("ACT_CUB_UTL_PCT"),
new ModelField("LD_PCE_CU_VOL_QY"),
new ModelField("SCH_TLR_RTE_TYP_CD"),
new ModelField("RTE_TYP_CD"),
new ModelField("MVM_TYP_DSC_TE"),
new ModelField("ROW_ID"),
new ModelField("TLR_PKG_VOL_SCH_PR"),
new ModelField("GROSS_PIECES"),
new ModelField("SCH_LD_DUE_DT"),
new ModelField("SCH_TRANSIT_DAYS"),
new ModelField("ACT_LD_DUE_DT"),
new ModelField("ACT_TRANSIT_DAYS"),
}
}
},
DataSource = dt //this is the DataTable that was created above
}
},
ColumnModel =
{
Columns =
{
//this is the build up of the column model, remember to have one column with flex=1
new Column { Text = "Seq", DataIndex = "FDR_SCH_ACY_SEQ_NR", Width = 30,Align = ColumnAlign.Center,Flex=1},
new DateColumn { Text = "LCD", DataIndex = "LD_CRT_DT", Width = 60,Format="M/dd/yy",Align = ColumnAlign.Center },
new Column { Text = "DOW", DataIndex = "DOW_CD_MNM_TE", Width = 50, ComponentCls = "x-grid-row-summaryr",Align = ColumnAlign.Center },
new DateColumn { Text = "Sch Dep. Time", DataIndex = "SEG_SCH_LCL_DPT_TM", Width = 125,Format="M/dd/yy h:mm tt" },
new DateColumn { Text = "Act Dep. Time", DataIndex = "SEG_ACT_LCL_DPT_TM", Width = 125,Format="M/dd/yy h:mm tt" },
new DateColumn { Text = "Sch Due Dt", DataIndex = "SCH_LD_DUE_DT", Width = 120,Format="M/dd/yy" },
new DateColumn { Text = "Act Due Dt", DataIndex = "ACT_LD_DUE_DT", Width = 120,Format="M/dd/yy" },
new NumberColumn { Text = "Sch Transit", DataIndex = "SCH_TRANSIT_DAYS", Width = 30 },
new NumberColumn { Text = "Act Transit", DataIndex = "ACT_TRANSIT_DAYS", Width = 30 },
new Column { Text = "Job Nr", DataIndex = "FS_JOB_NR", Width = 65 },
new Column { Text = "Load ID", DataIndex = "FS_LD_NR", Width = 65 },
new Column { Text = "Trailer #", DataIndex = "EQP_ASN_NR", Width = 65 },
new Column { Text = "Load", DataIndex = "LOAD_NAME", Width = 120 },
new Column { Text = "Orig", DataIndex = "LD_ORG_OGZ_NR", Width = 65 },
new Column { Text = "Sch OS", DataIndex = "PLN_ORG_SRT_TYP_CD", Width = 65 },
new Column { Text = "Act OS", DataIndex = "ACT_ORG_SRT_TYP_CD", Width = 65 },
new Column { Text = "Dest", DataIndex = "LD_DTN_OGZ_NR", Width = 65 },
new Column { Text = "DS", DataIndex = "LD_DTN_SRT_TYP_CD", Width = 65 },
new Column { Text = "Sch Eqp", DataIndex = "MVM_SEG_SCH_EQP_CD", Width = 65 },
new Column { Text = "Act Eqp", DataIndex = "SEG_ACT_EQP_TYP_CD", Width = 65 },
new NumberColumn { Text = "Gross Pieces", DataIndex = "GROSS_PIECES", Width = 65, Format="0,000" },
new NumberColumn { Text = "Sch Eqp. Cap", DataIndex = "SCH_EQP_CBU_CAP_QY", Width = 65, Format="0,000" },
new NumberColumn { Text = "Act Eqp. Cap", DataIndex = "ACT_EQP_CBU_CAP_QY", Width = 65, Format="0,000" },
new NumberColumn { Text = "Sch Util %", DataIndex = "SCH_CUB_UTL_PCT", Width = 65, Format="0.0 %" },
new NumberColumn { Text = "Act Util %", DataIndex = "ACT_CUB_UTL_PCT", Width = 65, Format="0.0 %" },
new NumberColumn { Text = "Loaded Cu. Ft.", DataIndex = "LD_PCE_CU_VOL_QY", Width = 65, Format="0,000.0" },
new Column { Text = "Sch Rte", DataIndex = "SCH_TLR_RTE_TYP_CD", Width = 65 },
new Column { Text = "Act Rte", DataIndex = "RTE_TYP_CD", Width = 65 },
new Column { Text = "Movement Type", DataIndex = "MVM_TYP_DSC_TE", Width = 65 },
}
}
};
return ComponentLoader.ToConfig(grid);