Hi,
I want to set the data 'FORMAT' of the parent column.
The data 'FORMAT' in your child's column is set as follows.
However, the parent column does not change when 'FORMAT' is specified.
Is there a way to specify the data 'FORMAT' in the parent column?
Regards.
Hi TaeWook,
Greetings from Syncfusion support
From your query we could see that you are using a stacked header column and facing the problem while applying format, before we start providing solution to your query, we need some information for our clarification. So, please share the below details that will be helpful for us to provide better solution.
1) Share your exact requirement scenario step by step with detailed description.
2) Please share your complete Grid rendering code, we would like to check what features you are using and also how you are defining the Format for child and parent.
3) Share your syncfusion package version.
4) If possible, share a simple issue reproducible sample.
5) Share your issue scenario in video demonstration format.
Regards,
Rajapandi R
//Grid with a fixed range of decimal points
<e-grid-column headerText="BUILDING INFORMATION" headerTextAlign="Center" textAlign="Center"
columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {
new Syncfusion.EJ2.Grids.GridColumn { HeaderText ="ROOM INFORMATION" , TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_AREA" , Width ="80" , Visible = false, Format ="N1", HeaderText ="ROOM AREA (m2)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right },
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_WIDTH" , Width ="80" , Visible = false, Format ="N1", HeaderText ="WIDTH (m)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_LGTH" , Width ="80" , Visible = false, Format ="N1", HeaderText ="LENGTH (m)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_CLG_HGT" , Width ="90" , Visible = false, Format ="N1", HeaderText ="CEILING HEIGHT (m)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_FULL_HGT" , Width ="90" , Visible = false, Format ="N1", HeaderText ="FULL HEIGHT (m)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_VOL" , Width ="100", Visible = false, Format ="N1", HeaderText ="ROOM VOLUME (m3)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="RM_NO_OF_OCC", Width ="100", Visible = false, Format ="N0", HeaderText ="NUMBER OF OCCUPANCY", DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }}} },
})"></e-grid-column>
<e-grid-column headerText="INDOOR CONDITION" headerTextAlign="Center" textAlign="Center"
columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {
new Syncfusion.EJ2.Grids.GridColumn { Field ="ID_COND_SUMM_DB", Width ="100", Visible = false, Format ="N1",
HeaderText ="SUMMER DB (°C)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number = true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="ID_COND_WNTR_DB", Width ="100", Visible = false, Format ="N1",
HeaderText ="WINTER DB (°C)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number = true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="ID_COND_RH" , Width ="100", Visible = false, Format ="N0",
HeaderText ="MAX RH(%)" , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number = true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="ID_COND_AH" , Width ="100", Visible = false, Format ="N5",
HeaderText ="AH (kg/kg) FOR HUMIDIFIER CALC." , DefaultValue ="" , HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number = true }}
})"></e-grid-column>
<e-grid-column headerText="WALL INFORMATION" headerTextAlign="Center" textAlign="Center"
columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {
new Syncfusion.EJ2.Grids.GridColumn { HeaderText ="OUTER WALL LENGTH(m)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWL_N", Width ="60", HeaderText ="N", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWL_E", Width ="60", HeaderText ="E", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWL_S", Width ="60", HeaderText ="S", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }},
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWL_W", Width ="60", HeaderText ="W", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right, ValidationRules = new { number=true }} } },
new Syncfusion.EJ2.Grids.GridColumn { HeaderText ="OUTER WALL AREA(m2)" , TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWA_N", Width ="60", HeaderText ="N", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right},
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWA_E", Width ="60", HeaderText ="E", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right},
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWA_S", Width ="60", HeaderText ="S", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right},
new Syncfusion.EJ2.Grids.GridColumn { Field ="OWA_W", Width ="60", HeaderText ="W", Visible = false, Format ="N1", DefaultValue ="", HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right}} },
})"></e-grid-column>
<e-grid-column field="STATUS" headerText="STATUS" width="150" headerTextAlign="Center" textAlign="Left" defaultValue="@empty" Edit="@(new { create ="STATUS_Create", read ="STATUS_Read", destroy ="STATUS_Destroy", write ="STATUS_Write" })"></e-grid-column>
<e-grid-column field="EQ_NM" headerText="EQUIPMENT NAME" width="180" headerTextAlign="Center" textAlign="Left" defaultValue="@empty"></e-grid-column>
<e-grid-column field="TAG_NO" headerText="ITEM TAG NUMBER" width="180" headerTextAlign="Center" textAlign="Left" defaultValue="@empty"></e-grid-column>
<e-grid-column field="TAG_NO_SPLIT" headerText="LOAD TAG NUMBER" width="180" headerTextAlign="Center" textAlign="Left" defaultValue="@empty"></e-grid-column>
<e-grid-column field="LOAD_DESC" headerText="LOAD DESCRIPTION" width="200" headerTextAlign="Center" textAlign="Left" defaultValue="@empty"></e-grid-column>
<e-grid-column headerText="HVAC CAPACITY" headerTextAlign="Center" textAlign="Center" defaultValue="@empty"
// I want to fix the decimal range of the parent column.
Regards.
Taewook,
From your query we could see that you are using a stacked header column and facing the problem while applying N1 format, based on your query we have prepared a sample and defined the format as N1, and it was working fine at our end. Please refer the below code example and sample for more information.
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })" allowPaging="true"> <e-grid-pagesettings pageCount="5"></e-grid-pagesettings> <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal"></e-grid-editSettings> <e-grid-columns> <e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" textAlign="Right" width="120" minWidth="10"></e-grid-column> <e-grid-column headerText="Order Details" columns="@( new List<Syncfusion.EJ2.Grids.GridColumn>() { new Syncfusion.EJ2.Grids.GridColumn { Field = "OrderDate", Width = "130", HeaderText = "Order Date", Format="yMd", TextAlign= Syncfusion.EJ2.Grids.TextAlign.Right, MinWidth="10" }, new Syncfusion.EJ2.Grids.GridColumn { Field = "EmployeeID", Width = "130", HeaderText = "Employee ID", Format="N1", TextAlign= Syncfusion.EJ2.Grids.TextAlign.Right, MinWidth="10" }, new Syncfusion.EJ2.Grids.GridColumn { Field = "Freight", Width = "135", HeaderText = "Freight($)", Format="N1", TextAlign= Syncfusion.EJ2.Grids.TextAlign.Right, MinWidth="10" } } )"> </e-grid-column> <e-grid-column headerText="Shipped Details" columns="@( new List<Syncfusion.EJ2.Grids.GridColumn>() { new Syncfusion.EJ2.Grids.GridColumn { Field = "ShippedDate", Width = "140", HeaderText = "Shipped Date", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right, Format="yMd", MinWidth="10" }, new Syncfusion.EJ2.Grids.GridColumn { Field = "ShipCountry", Width = "145", HeaderText = "Ship Country", MinWidth="10" } } )"> </e-grid-column> </e-grid-columns> </ejs-grid>
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/sample591628073.zip
Screenshot:
If you still face the issue, please share the below details that would be helpful for us to provide better solution.
1) Share your issue scenario in video demonstration format.
2) In your query you have define the format as N1 but the visible property as false, so please share the details about why you would set visible false for your columns.
3) In your query you have mentioned that “Is there a way to specify the data 'FORMAT' in the parent column”, please confirm what do you mean about the parent column, share the details
with detailed description.
4) Share your requirement in pictorial or video demonstration.
5) If possible, please share any issue reproducible sample or try to reproduce the issue with our above attached sample.
Regards,
Rajapandi R
I told you that there is no problem when there is another header under the top header.
Once again, when I can't apply FORMAT, it's when there's a top header.
Please check and reply again.
r
Taewook,
To understand your exact requirement and problem scenario, we have created a ticket in bold desk for meeting follow up. Please share your availability and time zone in the below ticket, we will share the meeting invite upon your confirmation to discuss the issue in detail.