General information
Category:
Forms & Form designer
>>>A form I have has 'somefile.dbf' in its data env. but under the properties section there is no mention of a rowsource etc.
>>>I want this form to accomadate files of different names but same structures.
>
>This is actually very simple to accomplish. The difficulty you may have is that you cannot define a recordsource for your grid in your form layout because the recordsource may not exist when the form is called. You will have to pass the recordsource name to the init method and set it there. You will also have to set the controlsource information. Something like this:
>
>WITH this.grid
> .setall("FontSize", 8, "Column")
> .setall("DynamicBackColor", "iif(!c_grid.cursordata,rgb(255,255,255),rgb(255,0,0))", "Column")
> .setall("DynamicForeColor", "iif(!c_grid.cursordata,rgb(0,0,0),rgb(255,255,255))", "Column")
> .recordsource = 'c_grid'
> .column1.controlsource = 'c_grid.cdisplay'
> .column2.controlsource = 'c_grid.effectivedate'
> .column3.controlsource = 'c_grid.cexpirydate'
> .column4.controlsource = 'c_grid.createddate'
>ENDWITH
Hi Bob,
Thanks for another way at looking at this problem. I guess this
set of codes should be embedded in the page that will contain the
grid ... assumming that a page frame control will be used.
I'll try it out ... thanks again.
Glenn
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only