General information
Category:
Forms & Form designer
Hi there,
We tried that, but it didn't make any difference. Any other ideas??
Thanks, Pablo
>>Hi!
This is a grid reconstruction behaviour.
To fix it, set the Grid.RecordSource property to "" (empty string). Then restore it. So your program will look like:
THisofrm.Grid1.RecordSource = ""
* do refreshing, close alias and re-open it etc.
...
THisofrm.Grid1.RecordSource = "MyAlias"
You can read more about grid recorstruction in FAQ#8019 and in VFP Grids Part I article in the August 2001 issue of the Universal Thread Magazine.
HTH.
>Can anyone explain what's just happened to my grid???
>
>I have a very very simple grid with 8 columns. I don't set the recordsource of the grid or the control source of each column until I need to...with the following code:
>
>IF USED("alsItem") THEN
> USE IN alsItem
>ENDIF
>
>USE lv_ClinicItem IN 0 ALIAS alsItem EXCLUSIVE
>
>thisform.grdItem.RecordSource="alsItem"
>
>Thisform.grdItem.grcItemNo.ControlSource="alsItem.cl_itemno"
>Thisform.grdItem.grcDate.ControlSource="alsItem.cl_date"
>etc...
>
>This has been working quite happily until an hour an a half ago when it decided to go bonkers. Specifically it started giving errors that the columns did not exist.
>
>We checked that the recordsource of the grid and controlsource of each column were blank and they were. We tried using a new grid...that didn't work. We checked that using a different view or table worked...they worked. We re-created the view....that didn't work.
>
>I've gone to my backup from lunchtime now, but I'd love to know (or have some idea at least) what caused this for future reference.
>
>Pablo
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