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

Calling a DBGridTitleClick event from another handler

Status
Not open for further replies.

sparky1970

Programmer
Feb 8, 2009
5
GB
Hi,

I'm at a point in a database project I'm writing where I need to call a DBGridTitleClick event from within another handler. I haven't used C++ builder for several years and it's not coming back as easily as I'd like.

I'm using the DBGridTitleClick event to sort the rows in the grid, highlighting and coloring titles etc, but of course when the grid is first shown it's not sorted. I want to call the event from the FormCreate method and send over the inital parameters so that when it's first shown it's sorted by column 0. Can anybody help??

The handler works fine once it's had the initial click. I've tried everything but the kitchen sink but I don't know how to deal with the TColumn *Column parameter which obviously needs to be sent with the call!

Any help much appreciated

Ivan
 
I'm afraid that the grid may not yet be ready when you call FormCreate. The grid may actually be created later down the line. I'll look around and see if I can find where the components are being created.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top