Recent

Author Topic: DrawGrid - deselect row at runtime  (Read 2520 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1057
DrawGrid - deselect row at runtime
« on: December 05, 2014, 11:47:08 pm »
Hi,

Is it possible to deselect row at runtime? DrawGrid1.Row := -1 or DrawGrid1.Row := 0 doesn't work. It always select something. I looked on grid options but doesn't find anything. For example in TListView.ItemIndex := -1 deselect row

Regards

lainz

  • Hero Member
  • *****
  • Posts: 4743
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: DrawGrid - deselect row at runtime
« Reply #1 on: December 06, 2014, 01:48:46 am »
Hi Dibo, Try:
Code: [Select]
DrawGrid1.Selection := Rect(-1,-1,-1,-1);

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: DrawGrid - deselect row at runtime
« Reply #2 on: December 06, 2014, 03:07:39 am »
Nope, first row always selected :(

lainz

  • Hero Member
  • *****
  • Posts: 4743
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: DrawGrid - deselect row at runtime
« Reply #3 on: December 06, 2014, 06:32:29 am »
ok so you have gorowselect option turned on, in other cases works.
Seems a bug. In the form editor is also selected by default the first row.

 

TinyPortal © 2005-2018