I'm using a card-mode UltraGrid (9.x under WinForms .net 3.5 VS'08) as a proxy for an otherwise complex form that displays many fields of a large data entity. By binding it to a dataSource consisting of a List with a single object, you get a display with labels on the left and data fields on the right.
Everything displays properly, but when the display is opened (it's a userControl in a tabview) the "first row" (which, because it's a card, is the first column) is always selected. This looks ugly. Additionally, there's a row-selection widget at the top of the column, which pushes everything down in the display.
I have turned off the row selection widgets, but this seems to have no effect. Any advice?
Maury
Hi Maury,
The card is probably not actually selected, it's probably the active row in the grid. The grid doesn't automatically select anything. But it does keep the active row in synch with the current position of the BindingManager, and by default, the grid has some appearances set up to make the active row appear selected.
Here's a KB article that tell you how to turn this off:
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.
I'm not sure what you mean by "row selection widgets". I think the way you select a card is by clicking it's header. So you probably want to do this:
band.CardSettings.ShowCaption = false;
Thanks Mike! One follow-up though... is there a way to turn off the band's caption through the editor, or can this only be done in code? I'm trying to keep my code as "thin" as possible.
What "band caption" are you referring to? You mean the card caption? If you have a DataSource assigned to the grid at design-time or you have designed your schema in the grid designer, then the bands will be available in the grid designer and you can set the property at design-time. If you don't have the band at design-time, then no, I don't think there's any way to do it.
To do that, there would have to be a property on the Override object to turn off the card captions for all bands. There might be such a property - so take a look at the available properties on the override and see if there is something like ShowCardCaptions. I don't think there is one, but I could be wrong. :)