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
235
How to set not select active row and how to align header caption?
posted

Hello genius,

I have meet two problems when using UltraGrid:

1) When I cilck a cell, the row(containing the cell) will be set to active and the row's color is blue.  I am trying

gridBand.Override.SelectTypeRow = SelectType.None;

but it doesn't work, is there any property to set about not select the acive row?

2) Is there any property to set align the caption of the column header? I want align the text in the caption to middle. Usually it will be align to middle but sometimes will not work:-) 

Thanks for help in advance! Any ideas are appreciated.

Alfonzoe

Parents
No Data
Reply
  • 45049
    Verified Answer
    posted

    1) You're confusing "row activation", which refers to the row that either directly has input focus or contains the cell that has input focus, with "row selection", which refers to one or many rows that have been selected for action.  You can't disable row activation, but you can make it so that the row's appearance isn't changed to the user.  In design view, go to DisplayLayout.Override, right click the "ActiveRowAppearance" property, and select "Reset".  Alternately, you can set both the DisplayLayout.Override.ActiveRowAppearance.ForeColor and DisplayLayout.Override.ActiveRowAppearance.BackColor properties to "Color.Empty" in code.

    2) There are a number of places where this can be set.  The one that would affect the whole grid is the DisplayLayout.Override.HeaderAppearance.TextHAlign property.  This can also be set off the band's Override.HeaderAppearance.TextHAlign property, and the column's Header.Appearance.TextHAlign property, each taking precedence over the earlier ones.

Children