[Solved] GridView Highlight selected row

Post your Gambas programming questions here.
Post Reply
AndyGable
Posts: 65
Joined: Wednesday 02nd December 2020 12:11am
Location: England
Contact:

[Solved] GridView Highlight selected row

Post by AndyGable » Monday 12th April 2021 9:04pm

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: 473
Joined: Thursday 23rd July 2020 5:20pm

Re: GridView Highlight selected row

Post by BruceSteers » Monday 12th April 2021 10:39pm

GridView1.Rows[GridView1.Row].Selected = True
Last edited by BruceSteers on Tuesday 13th April 2021 9:15am, edited 1 time in total.
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 473
Joined: Thursday 23rd July 2020 5:20pm

Re: GridView Highlight selected row

Post by BruceSteers » Monday 12th April 2021 10:40pm

Hang on, it should do it anyway.

You have to set GridVew1.Mode property to single or multiple
Wishing well
Bruce

If at first you don't succeed , try it differently.

AndyGable
Posts: 65
Joined: Wednesday 02nd December 2020 12:11am
Location: England
Contact:

Re: GridView Highlight selected row

Post by AndyGable » Wednesday 14th April 2021 7:33pm

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