You'll need to monitor the mouseDown and mouseup events for the Flexgrid if you don't want the user to select more than one row. On mousedown, set the redraw property to false to not show the user more than the first row selected. On mouse up, if the Row property does not equal the RowSel, set the RowSel to equal .Row and turn the redraw property back to true.
Sub fg_MouseDown
fg.Redraw = false
End sub
Sub fg_MouseUp
if fg.row <> fg.rowsel then
fg.RowSel = fg.row
end if
fg.redraw = true
End sub
hey thanks for ur reply.. it works very well... but jsut another question. why i cant hightlight the whoel row? the first cloumn of the row is not hightlighted?
Set the SelectionMode property to flexSelectionByRow and the fg.Highlight to flexHighlightAlways, either in design mode or in runtime on teh Form_Load event.
Sub Form_Load
fg.SelectionMode = flexSelectionByRow
fg.HighLight = flexHighlightAlways
End Sub
I have a SStab with 3 tabs.. on the 2nd tab there is a MSflexGrid, which i can select by rows only. With i try to go to other tab and come back to the 2nd tab, the selected row in the MSflexGrid is not hightlighted, even thought grd1stLevel.RowSel have some value.
How can i make MSflexgird to hightlight on the row i previous selected when i come back form other tab?
If you're setting the fg.HighLight = flexHighlightAlways, it should remain selected regardless of which tab is selected. If it's not, then you might be doing something elsewhere that sets the .HighLight property to another setting.
You could always refresh the flexgrid on the SSTab1_Click event if SSTab1.Tab = the tab the flexgrid is on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.