Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msflexgrid problems... 1

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

I´m using microsoft flexgrid, and I have 2 problems. I would appreciate any help :)

First problem:

I have a grid with 3 columns (in fact, the first one is a fixed column so I don´t want to write into it), and a random number of rows (the first one is fixed and I don´t want to write to it).

The problem is that, when the user selects one row, the second column(with data on it) don´t became highlited, only the third column stay like that (in the row selected). I would like to get all the cells of the row highlighted!

Second problem:

The user is able to select a lot of rows by draging the mouse... I would like to able the user to select only one row! I have already set the selection mode = by row. The user actually only selects one row(the first one is the row that stay selected), however, by draging the mouse, a lot of them became highlitted :(

Any help is appreciate :)

Thank you

Sergio Oliveira

 
First Problem:
- Set flexgrid SelectionMode property to ByRow
- Set flexgrid FocusRect property to 0 (None)

Second Problem:
- Insert the following into the flexgrid_mousedown()event:
flexgrid.redraw = false

- Insert the following into the flexgrid_mouseup()event:
flexgrid.redraw = true



Mark
 
Hi,

The first problem is solved, thank you.
However, in what concerns to the second problem, I´m still able to select multiple rows. What happen is that, despite it seems I´m not be able to do that (due to the code you saied, when I click on the mouse and then drag it down, it seems no more rows will be selected), in fact, after I release the mouse button, all the rows where I pass the mouse over will be selected. So waht happened is that I delay the selection but it still exists :(

any ideia?

Thank you

Sergio Oliveira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top