Row visibility

Apr 13, 2011 at 9:58 AM

This might be me not paying sufficient attention, but I don't seem to be able to hide rows.

As also mentioned in http://sourcegrid.codeplex.com/discussions/216097 row visibility should be controlled through the Rows collection object, but vb.net code

Grid1.Rows.IsRowVisible(n) = False
(which should replace obsolete statement Grid1.Rows(n).Visible = False)

generates the error "Expression is a value and therefore cannot be the target of an assignment". IsRowVisible does not indicate row visibility in the current scroll range either, so I'm not certain what this function does and how I should hide a row other than setting its height to zero. Few hints in the documentation and examples, could someone please suggest what would be the (best) solution?

Thanks!

Apr 14, 2011 at 7:31 AM

Use

dim _visibe as boolean 'true, false , as you like

_Grid1.Rows.ShowRow(n, _visible )


the same as the property Visible

_GridQte.Rows(0).Visible =_visible 

Public Property Visible As Boolean
    Get
        Return Me.Grid.Rows.IsRowVisible(Me.Index)
    End Get
    Set(ByVal value As Boolean)
        Me.Grid.Rows.ShowRow(Me.Index, value)
    End Set
End Property

 

 

 

Apr 15, 2011 at 9:07 AM

Yes, that works, thank you!