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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to hide and disable plus/minus cells

Thread ID:

Created:

Updated:

Platform:

Replies:

92589 Jan 24,2010 07:55 AM UTC Jan 25,2010 05:41 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Maurizio Selvaggini
Asked On January 24, 2010 07:55 AM UTC

Hi,
i need to hide and disable plus/minus cells in a hyerarchical gridgrouping control when no data are present for child view.
To achieve this result I have followed instructions of a previous post:

Protected Sub gridx_QueryCellStyleInfo(ByVal sender As Object, ByVal e As Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellStyleInfoEventArgs) Handles gridx.QueryCellStyleInfo

If (e.TableCellIdentity.TableCellType = GridTableCellType.RecordPlusMinusCell) Then
recx = e.TableCellIdentity.DisplayElement.ParentRecord
If (Not recx Is Nothing) And (recx.NestedTables.Count > 0) And (recx.NestedTables(0).ChildTable.FilteredChildNodeCount = 0) Then
e.Style.CellType = "Static"
e.Handled = True
Exit Sub
End If
End If
End sub

In the code above the plus/minus cell type is changed to "static".
It works, but clicking on the rows where the plus / minus is not visible, it also expands the child view.

Can I set grid properties to prevent expanding of rows when no child data are available?

Thanks
Maurizio Selvaggini

Bharath M [Syncfusion]
Replied On January 25, 2010 05:41 PM UTC

Hi Maurizio,

Thank you for your interest in Syncfusion products.

We suggest you to change the TableCellIdentity.TableCellType as GridTableCellType.RowHeaderCell after changing CellType to Static. This will prevent postBack to be made on clicking of PlusMinusCell.

Let me know if you have any concerns.

Regards,
Bharath .M

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;