General information
Category:
Coding, syntax & commands
>>>Hi,
>>>
>>>I want to show a container in a grid. I have done it before and it worked. But this one does not work.
>>>
>>>Here is what I did:
>>>
>>>I created a container with some labels and textboxes. Then I set the grid column1 currentcontrol to this container. Then I removed the default text control from the grid. So now the grid has just one column with the currentcontrol pointing to the container name. I set the column Sparse to .F. (although I even tried .T. with the same results). I set the grid ColumnCount to 1.
>>>
>>>When I run the form, the records of the base cursor are shown in the grid with many columns. As if the container within the grid does not exist.
>>>
>>>What else could I check?
>>
>>I presume you're setting this up at design time, and at runtime the grid appears to "reset" itself? If so, that sounds like you're running into "grid reconstruction"
>
>I think you are right. But I don't know how to prevent it. I think I ran into this issue before; just need to remember how I resolved it. At least now I know where to focus. Thank you.
Have you tried "disassociating" the grid from the record source (e.g. setting recordsource to blank), just before something like a requery() (or anything else that might be rebuilding the table, such as PACK), then reassigning the record source?
Previous
Next
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