Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
Empty wingrid shows column headers
posted

Using 8.2.20082.2187, I have a wingrid bound to a generic IList of a custom object via its Datasource property.

 

                gridCipherVariation.DataSource = null;

                gridCipherVariation.DataSource = someInstanceOfIListCollection

When the grid is first displayed, the collection is empty, has a count of 0. The grid displays "drag a column here to group by that column" and below that the 3 column headers.

I set the DisplayLayout.GroupByBox.Hidden to true, but the "drag a column..." remained.

How can I get to grid to display nothing when its datasource is empty?

Thanks, Lars

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Lars,

    What exactly do you want to remove?

    Setting GroupByBox to hidden should remove the GroupByBox. If that's not working, then something is wrong. Perhaps you are loading a layout into the grid after setting the Hidden property, so it's getting set back to true (or default) after you set it. 

    If you want to remove the column header, then you either need to set the grid's DataSource to null, or else use a CreationFilter. I posted some sample code demonstrating this here in this thread:

    Empty gride message - Infragistics Forums

     

Children
No Data