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

disable new row row on GridGroupingControl

The GridGroupingControl has a new row row which I'd like disabled and hidden, but I can't find where this is done. How do I disable it? I don't want to see it at all.

Thanks

4 Replies

IB ian bradley May 27, 2012 10:09 AM UTC

That was a hunt and a half.

_gridGroupingControl.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;



AS Asarudheen S Syncfusion Team May 29, 2012 10:11 AM UTC

Hi Ian,

Thank you for your interest in Syncfusion products.

You can achieve the reported behavior "Disable the add new record " by using the property "ShowAddNewRecordBeforeDetails" or "ShowAddNewRecordAfterDetails" to false.

Please refer the following code.
  
this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = false; //if the add new record is at the end of the group.

            this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false; // //if the add new record is at the top of the group.

Please let us know if you need any further assistance.

Regards,
Asarudheen.


SI singh June 21, 2018 01:04 AM UTC

Hi Asarudheen S;

Please Check.

Event After Settings ShowAddNewRecordAfterDetails = False, ShowAddNewRecordBeforeDetails  = False

i am able to see new record option in grouping grid.

Please check bellow code.

 Dim c As New ClassMenu
        c.CommonCode = "001"
        c.MenuCode = 1
        c.menuName = "Country"
        lst.Add(c)
        c = New ClassMenu
        c.CommonCode = "001"
        c.MenuCode = 2
        c.menuName = "State"
        lst.Add(c)

        c = New ClassMenu
        c.CommonCode = "002"
        c.MenuCode = 3
        c.menuName = "Purchase"
        lst.Add(c)

        GridGroupingControl1.DataSource = lst

        GridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = False
        GridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = False
        Me.GridGroupingControl1.TableDescriptor.GroupedColumns.Add("CommonCode")
        Me.GridGroupingControl1.Table.ExpandAllGroups()

        GridGroupingControl1.TableDescriptor.Columns(0).ReadOnly = True
        GridGroupingControl1.TableDescriptor.Columns(1).ReadOnly = True
        GridGroupingControl1.TableDescriptor.Columns(2).ReadOnly = True





SN Sindhu Nagarajan Syncfusion Team June 21, 2018 06:50 AM UTC

Hi Raman, 

Thanks for contacting Syncfusion support. 

We have analyzed the code snippet you have provided. As per the code, you have set ShowAddNewRecordBeforeDetails to False only to the TopLevel grid. In order to hide the AddNewRecord row to the groups , you can set ChildGroupOptions.ShowAddNewRecordBeforeDetails to False. Please refer to the below code and sample, 

Code Snippet 
'Disables the AddNewRecord at top of the group 
Me.gridGroupingControl1.ChildGroupOptions.ShowAddNewRecordBeforeDetails = False 


Please let us know if you have any other queries. 

Regards, 
Sindhu  


Loader.
Live Chat Icon For mobile
Up arrow icon