Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSFlexgrid fixed row event woes
Message
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00362726
Message ID:
00362869
Views:
19
>>I have a wonderful grid that I desire to sort based on the user clicking on the fixed row columns. I don't know how to tell if the user clicked on the fixed row of the grid. The columns I get fine but the grid reports the same (.row = 1) if you click on the fixed row or the first actual data row. I have not found in the help a method or event to single out the header (fixed row) clicks. I would very much appreciate your help.
>
>I had this comment from elsewhere:
>«i think i saw this issue before. solutions seemed to follow along the lines of creating an invisible picture box or such like control and placing it over the header row columns as needed. then respond to the click events that way.»

Thanks Eric, the link was highly usefull. Also, had I not worked out an answer I would be up and running now with your help. I truly appreciate the time you and the rest of the UT'ers take to answer as many of these questions as you do. I hope that the newer coders know how much the UT smooths out the learning curve. I am compiling some useful functions that deal with flexgrids and I will upload it to the UT as a plug in mod after I do some more testing (and a software release) anyway the code follows.

I tried a similar way using transparent shapes. But I allow resizing in the app. What I worked out is a nice clean solution that I am still testing.
Private Sub grdBudgetSummary_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
With grdBudgetSummary
    If y >= 0 And y <= .RowHeight(1) Then ' This will only be your fixed row
        ' Do a case here based on desired col type sorting
        ' the .col will be correct and it works after resizing the
        ' control. And a toggle value for ascending
        ' and descending will be nice here.
        If .col = 4 then ' Last Name column
            .sort = flexSortStringNoCaseAsending '5 
        End If 
    End If
End With
End Sub
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform