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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 MsFlexGrid Cell Border

Status
Not open for further replies.

acjeff

Programmer
Aug 10, 2004
148
US
Can I set borders for a cell or a row by VB code? How?
 
You cannot change individual cell border as far as I know. You can use the properties dialog box for the grid to change all of the cell borders from Inset to None etc, however.
-Max
 
Another question: when I click on the heading row (row 0), it select row 1 automatically. Why is that? How to make it not happen? I use SelectionMode=flexSelectionByRow. I tried using flexSelectionFree and the result is the same.
 
You cannot select the heading row, that's why the first row is automatically selected when you select it. You can detect clicks on it, the index will come in as 0, but you cannot select it.
-Max
 
What I am doing is I am writing the sort record function. When users click any one heading of a column, all flexgrid records will be sorted by that specified column.

When I tried this:

If fgInventory.Row = 0 Then
'do sorting here

However, everytime I click on a cell of heading row, it returns row = 1, instead of 0. I just cannot catch the row 0.

So what can I do next?
 
Try setting focus to another control in the MouseDown Event.

If MSFlexGrid1.MouseRow = 0 Then
SomeOtherControl.SetFocus
Exit Sub
End If


Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
acjeff, take a look at faq222-3262 MS Flexgrid Tips and Tricks, it has some good information.


Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top