[Solved] GridView Highlight selected row

Post your Gambas programming questions here.
Post Reply
AndyGable
Posts: 359
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

[Solved] GridView Highlight selected row

Post 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?
Last edited by AndyGable on Wednesday 14th April 2021 7:33pm, edited 1 time in total.
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: GridView Highlight selected row

Post by BruceSteers »

GridView1.Rows[GridView1.Row].Selected = True
Last edited by BruceSteers on Tuesday 13th April 2021 9:15am, edited 1 time in total.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: GridView Highlight selected row

Post by BruceSteers »

Hang on, it should do it anyway.

You have to set GridVew1.Mode property to single or multiple
If at first you don't succeed , try doing something differently.
BruceS
AndyGable
Posts: 359
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Re: GridView Highlight selected row

Post 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
Post Reply