Page 1 of 1

[Solved] GridView Highlight selected row

Posted: Monday 12th April 2021 9:04pm
by AndyGable
Hi all,

this may be a simple thing but i can not work this out and even google is not returning what I wanted

What I want to do is when a row cell / row is clicked on a gridview I would like the entire row to be selected (highlighted)
can this be done with Gambas?

Re: GridView Highlight selected row

Posted: Monday 12th April 2021 10:39pm
by BruceSteers
GridView1.Rows[GridView1.Row].Selected = True

Re: GridView Highlight selected row

Posted: Monday 12th April 2021 10:40pm
by BruceSteers
Hang on, it should do it anyway.

You have to set GridVew1.Mode property to single or multiple

Re: GridView Highlight selected row

Posted: Wednesday 14th April 2021 7:33pm
by AndyGable
BruceSteers wrote: Monday 12th April 2021 10:39pm GridView1.Rows[GridView1.Row].Selected = True
BruceSteers wrote: Monday 12th April 2021 10:40pm Hang on, it should do it anyway.

You have to set GridVew1.Mode property to single or multiple
Hi BruceSteers

Thank you for the advice that was JUST what I wanted with the combo of GridView1.Rows[GridView1.Row].Selected = True after I have set focus to the grid it works perfectly.

Thank-you again


Andy