Skip to content

Weird: Selected.Rows.Count = 0

New Discussion
Andrew
Andrew asked on Sep 29, 2008 8:13 PM

Hello, friends,

I was given a bug to fix and I have a weird issue:

 No matter how I select rows (single selection, extented selection, etc.) in a Infragistics.Win.UltraWinGrid.UltraGrid control from our app, the grid's Selected.Rows.Count always returns 0.

It looks like some other properties stop selected rows being added into Selected collection.

Moreover, when I select multiple rows, only the last row is highlighted for the whole row, only the first cell is highlighted for the rest of rows.

Help please and thanks.

Sign In to post a reply

Replies

  • 0
    Mike Saltzman
    Mike Saltzman answered on Sep 26, 2008 3:56 PM

    If the whole row is not selected, then the row is not selected. I'm not sure why it's happening, but clearly you are selecting cells and not rows.

    The last row probably isn't selected, either, it's most likely the ActiveRow – so it just looks like a selected row. 

    How are you selecting the rows? Are you clicking on a cell or on the RowSelector? What is the CellClickAction property set to?

    • 0
      Andrew
      Andrew answered on Sep 26, 2008 4:53 PM

      Thank you, Mike.

       You are right. The last row isn't selected. It is the ActiveRow.

      Users select rows by clicking on a cell, or together with Shift/Ctrl key. The CellClickAction property is Default.

      • 0
        Mike Saltzman
        Mike Saltzman answered on Sep 26, 2008 8:42 PM

        If you want clicking on a row to select the row, then you probably want to set CellClickAction to RowSelect. Also make sure the SelectTypeRow property is set to the default or some other settings that allows the selection of multiple rows. You might also want to turn off the selection of cells using SelectTypeCell. 

      • 0
        Andrew
        Andrew answered on Sep 26, 2008 11:21 PM

        We will try and let you know. Have a nice weekend. Thanks again.

      • 0
        Andrew
        Andrew answered on Sep 29, 2008 8:13 PM

        it worked. thanks.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Andrew
Favorites
0
Replies
5
Created On
Sep 29, 2008
Last Post
17 years, 6 months ago

Suggested Discussions

Tags

Created by

Created on

Sep 29, 2008 8:13 PM

Last activity on

Sep 29, 2008 8:13 PM