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!

Grid

Status
Not open for further replies.

EC1

Programmer
Jul 22, 2002
25
BE
Hi all,

i am creating a grid on a form. If the user clicks on the header of a column, i want to execute a procedure. What do i have to do? See syntax below.

thanks


With Thisform
.AddObject("gridz","grid")
ENDWITH
*
With Thisform.gridz
.enabled = .t.
.visible = .t.
.top=230
.left=10
.height=450
.width=800
.allowheadersizing=.F.
.allowrowsizing=.F.
.columncount=9
.deletemark=.F.
.enabled=.T.
.fontbold=.T.
.fontname="Courier New"
.fontsize=8
.headerheight=25
.recordsource="cl_client"
ENDWITH
*
With Thisform.gridz.column1
.columnorder=1
.fontbold=.T.
.fontname="Courier New"
.fontsize=8
.enabled=.T.
.readonly=.F.
.width=100
.header1.alignment=2
.header1.caption="CLIENT"
.header1.fontbold=.T.
.header1.fontname="Courier New"
.header1.fontsize=10
.header1.click ????????????????????
ENDWITH
*
 
Mike,

thanks for helping. But, there is something i don't understand.
Normaly, i create a grid at design. So, i can put some code in the click event of the header. But now, when the user clicks on a button at runtime, i create the grid with the code above. But where do i put the code for the click event of the header? I am not familiar with this kind of programming.

Thanks
 
EC1

Take a look at faq184-2164.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top