You must always make the object that you add programamtically visible
after adding it, even if it displays in the grid. So after adding it,
set .visible = .T.
Frank.
Frank Cazabon
Samaan Systems Ltd. - Developing Solutions
www.SamaanSystems.com/
Referrals are important to us.
If you know of anyone who would benefit from our services, please contact me.
We would appreciate the opportunity to work with them.
Jack Skelley wrote:
> Good Afternoon All:
> I have a grid that I define at runtime where I set the number of columns,
> recordsource, etc.
> I am trying to add a checkbox in place of the standard textbox.
> When the grid is displayed I see the caption to the checkbox, the checkbox
> and all the other fields in the grid but I can't change the value of the
> checkbox when I click on the checkbox. See the code below.
> for i = 1 to thisform.grdView.columncount
> do case
> case gaFiled(i,2) = "L"
> with thisform.grdView.Columns(i)
> .AddObject("chkPrint", "CHECKBOX")
> .chkPrint.name = "chkPrint"
> .RemoveObject("text1") &&deleting default textbox in that
> column
> .CurrentControl = "chkPrint"
> .controlsource = gaField(i,1)
> .chkPrint.Visible = .T. &&The following line of code make sure
> the control is visible
> .chkPrint.Caption = "Print Label?"
> .chkPrint.FontBold = .t.
> .ReadOnly = .f.
> .chkPrint.ReadOnly = .f.
> .Sparse = .F. &&is displayed in every row in the grid
> .chkPrint.tooltiptext = ALLTRIM(gaCaption(i,1))
> endwith
> endcase
> endor
> What Am I doing wrong?
> Thanks for any help!
> Regards,
>
> Jack Skelley
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.