How to hide and disable plus/minus cells

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

1 Reply

BM Bharath M Syncfusion Team 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

Loader.
Up arrow icon