We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Nested table display settings

Hi all,

Could anyone indicate how to do the following please?

1) Hide the asterisk row in the nested grids
2) Autoexpand all grids (m_historic.NestedTableGroupOptions.IsExpandedInitialValue = true doesn't seem sufficient)
3) Prevent the collapse of the nested grids (i.e they are always visible - we should probably hide the plus/minus button too in the parent grid under the primary key)

Thanks in advance,

Henry


3 Replies

AD Administrator Syncfusion Team November 5, 2008 12:02 PM UTC

By the way, this is a GridGroupingControl.

4) I also need to change the background colour in the area of the control that is NOT occupied by the Grid.



AD Administrator Syncfusion Team November 5, 2008 12:46 PM UTC

I have solved problem 1, using:

m_historic.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;

Can anyone think how to solve the other issues, please?



NA Nisha Arockiya A Syncfusion Team November 10, 2008 11:33 AM UTC

Hi Henry ,

2)Autoexpand all grids (m_historic.NestedTableGroupOptions.IsExpandedInitialValue = true doesn't seem sufficient)

To turn off the autosizing of the columns when the grid is first displayed, you set this property:


gridGroupingControl1.TableOptions.ColumnsMaxLengthStrategy = GridColumnsMaxLengthStrategy.None;


The other 2 enumeration values for this property tell the grid to either size the column by inspecting all values(MaxLengthSummary) or only the first N values(FirstNRecords).

If you set the first N values enumeration, you also should set:


gridGroupingControl1.TableOptions.ColumnsMaxLengthFirstNRecords = 50;//the number of records you want checked


3)Prevent the collapse of the nested grids (i.e they are always visible - we should probably hide the plus/minus button too in the parent grid under the primary key)

There is a built-in support for hide the a single cell in a grid. If you want to hide the GroupCaption row in a grid, you need to set the ShowCaption property to false.

//For MainTable GroupCaption..
this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;

//For nested GroupCaption..
this.gridGroupingControl1.NestedTableGroupOptions.ShowCaption = false;

//For ChildGroupCaption.
this.gridGroupingControl1.ChildGroupOptions.ShowCaption = false;

4)I also need to change the background colour in the area of the control that is NOT occupied by the Grid.

To set the background colour for the grid, please add the code below. This resolves the problem.
Here is a code snippet.

this.gridControl1.Properties.BackgroundColor = SystemColors.Window;

Let us know if you need any further help.
Thanks for using Syncfusion Products.

Regards,
Nisha



Loader.
Live Chat Icon For mobile
Up arrow icon