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
60
UltraGrid Cannot tell row has been deselected
posted

Hi,

I have an ultragrid control on a windows form.  It is setup to allow multiple rows to be selected and that works well.  As, when CTRL is held down and the row selector clicked the row is highlighted.

However when clicking a row again it does not appear to deselect, as remains highlighted.  Clicking on another row afterwards then takes the highlighting of the row that was clicked before!

I believe the row is genuinely deselected despite appearances as actions that loop through all selected do work correctly (i.e. do not include the deselected row even though it is showing as selected).

Interesting I have another grid that does behave as expected but I have not yet worked out what setting(s) might be different, any suggestions of what I might be doing wrong?  The one that is working the grid is created in code but the one that is misbehaving has been drawn on the form in the designer.

All the best,

Jonathan

Parents
  • 1700
    Verified Answer
    Offline posted

    Hello Jonathan,

    By default, when you place a new grid on a form, the designer loads a preset which will set the ActiveCellAppearance and ActiveRowAppearance, which you can change in design-time or through code. The default BackColor and ForColor properties for the Active and Selected rows are the same so this is the reason why you are seeing the active row highlighted even though it is not selected.

    To overcome this, you could reset the active row appearance via the designer or with the following code:

      this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance.Reset();

    In case you are using a style library you could change the ResolutionOrder property of the grid to ControlThanApplication, so that changes done on the application are taking priority over the style library. To do this, open the AppStylist, select “UltraGrid”, in the properties explorer find the ResolutionOrder property and set it to ControlThanApplication.

    Please let me know if you have any questions.

    Regards,
    Ivan Kitanov

Reply Children