Issue with DBgrid Indicator row icons and selection state. lazarus / 16-Databases ---------------------------------------------------------------------- snorkel · 2019-12-20 04:46 Hi, What is the deal with the dbgrid indicator row?  It's confusing to the user that they can have two rows that look selected i.e. highlighted but only one is actually selected.  If the row has the solid black indicator arrow it's not selected until you click it again so it has the arrow with a dot in it. is there a option I am missing to make it so if the row is highlighted it's selected instead of the indicator icon? ---------------------------------------------------------------------- snorkel · 2019-12-20 15:14 This is what I mean: Not selected: See attachment capture1 selected see attachment capture2 ---------------------------------------------------------------------- wp · 2019-12-20 15:55 Isn't this multi-select? When dgMultiSelect is contained in Options you can select multiple rows by CTRL-clicking them; in this case the circular icon is used. The last row clicked has the icon with the circle plus arrow to indicate that it is the active row.  Another click within the row leaves row-select mode and highlights only the clicked cell to indicated that this is the field which will be edited when the dataset goes into edit mode. ---------------------------------------------------------------------- snorkel · 2019-12-20 17:24 Yes, it is multi select and the issue the way the rows are highlighted I guess, for example say I want to hide the indicator column, the row looks selected but it's not until you click on it again and the indicator changes to the arrow with a dot. ---------------------------------------------------------------------- GAN · 2019-12-20 19:04 I don't have this problem, I always use CRTL+Click to select the row. TDBGrid Options (set to True) dgAlwaysShowSelection dgIndicator dgMultiselect dgRowSelect ---------------------------------------------------------------------- snorkel · 2019-12-20 20:28 GAN, I have the exact same options set to true by the way. in your example if you left click it will go back to the solid arrow indicator and the row will be highlighted but not selected.  Most other grids work if the row is highlighted blue it's selected, for example look at the file list grid in filezilla as an example.  So if a user sees that and does not fully understand the whole indicator thing they will think the row is selected and try to delete the file or whatever and because mygrid.selectedrows.count = 0 it will pop up a message saying please select some rows LOL Clear your selection, then left click on a single row, it goes to the solid indicator arrow, the row is highlighted blue and it's not selected, if you have checks to see if the row is selected for a delete or whatever it won't activate because you actually have 0 rows selected.  I would be ok with that if the row was not highlighted blue or whatever color its set to in the properties. What I finally did was add this to the cellclick: filegrid.SelectedRows.CurrentRowSelected:=true; and then did the same for the first row when the grids loads or refreshes. ---------------------------------------------------------------------- GAN · 2019-12-20 21:27 First, I understando wath you are saying and you solved it, so this is good. I think there's no issue here, it's the correct behavior of TDBgrid. In my case, I tell the users that have to select de rows with CRTL+Clik, then I validate that. And yes, if no row selected then I use a showmessage indicating the user that don't forget to use CRTL+Click to select the rows.