Show headers when there is no data

Not Answered This post has 0 verified answers | 4 Replies | 3 Followers Thread's RSS feed.

asinacs
Points 75
Replied On: Wed, Sep 14 2011 6:42 AM Reply

How to show healders for Ultragrid when there is no data?

  • Post Points: 20

All Replies

Mike Saltzman
Points 440,345
Infragistics Employee
Replied On: Wed, Sep 14 2011 11:03 AM Reply

If you bind the grid to a DataSource which has columns defined, but no rows, then the grid will display the column headers with no data - at least for the root level. There's no way to show headers for a child band without at least one parent row.

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 35
asinacs
Points 75
Replied On: Thu, Sep 15 2011 6:56 AM Reply

Thanks You pointed me in the right direction.

  • Post Points: 5
mmoritko
Points 245
Replied On: Thu, Feb 2 2012 11:26 AM Reply

Hi Mike,

Is Band[0] - 'Band 0' considered the parent row?  I am using the card view and the column (row headers) are not visible if no data is returned to the grid.  All of my columns are defined under 'Band 0'.  I'd like to show the headers regardless of data.

Thanks,

Michelle

  • Post Points: 20
Mike Saltzman
Points 440,345
Infragistics Employee
Replied On: Fri, Feb 3 2012 9:35 AM Reply

Hi Michelle,

mmoritko:
Is Band[0] - 'Band 0' considered the parent row?

Band 0 is the root level, yes.

mmoritko:
I am using the card view and the column (row headers) are not visible if no data is returned to the grid.  All of my columns are defined under 'Band 0'.  I'd like to show the headers regardless of data.

It does not appear that there is any way to do this in CardView mode, though.

By default, each card shows it's own column headers. So if there are no cards, there are no column headers.

It's possible to place the headers on the left and display them only once instead of on each card by setting the band.CardSettings.Style to MergedLabels. But I tried this out and it still does not display the headers when there are no card.

So it looks like there is currently no way to do what you want here. I recommend that you Submit a feature request to Infragistics

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 5
Page 1 of 1 (5 items) | RSS