drosenkranz
Programmer
Hello,
I'm having trouble with a grid that is embedded in a pageframe. The grid was created with the "wizard". It has combo boxes and check boxes, and text boxes. It works perfectly. When I go back and delete a column, all of the control sources for the controls "shift over" in the grid - regardless of the controls present. Example
Column: Column1 Coumnl2 Col3 Col4
Control: textbox checkbox combobox textbox
Control source: Name Married Relation place of birth
If I delete Col1, the controls remain as before but the control sources shift over.
Column: Col1 Col2 Col3 Col4
Control: textbox checkbox combobox textbox
Control source: Married Relation place of birth (next field in grid)
The code behind the controls also shifts to the new column - regardless of the type of control that is there. The code that was "behind" the original control in the grid shift along with the control sources of each column.
This is the real killer - now all of the column numbers in the code behind these controls NO LONGER WORKS because the code still refers to the old column numbers. Example:
Thisform.PageFrame1.Page4.Grid1.Column3.combo1.text is now in Col2 , not Col3 ... and there's a LOT of code behind some of these controls.
The same thing occurs if I add a new field into the table betwee two existing fields.
Even more damage occurs if I go back and use the grid's builder again.
1) Is there a work around?
2) Can you edit the .sct file?
3) Can you remove a control from a column once you've added it to the column and set it as the "current control" ?
4) Does VFP 8 address this problem?
At this point, any and all suggestions on handling grids - especially concerning rearranging columns AND the behavior of the "builder" for grids would be greatly appreciated.
Thank You,
Dave
The 2nd mouse gets the cheese.
I'm having trouble with a grid that is embedded in a pageframe. The grid was created with the "wizard". It has combo boxes and check boxes, and text boxes. It works perfectly. When I go back and delete a column, all of the control sources for the controls "shift over" in the grid - regardless of the controls present. Example
Column: Column1 Coumnl2 Col3 Col4
Control: textbox checkbox combobox textbox
Control source: Name Married Relation place of birth
If I delete Col1, the controls remain as before but the control sources shift over.
Column: Col1 Col2 Col3 Col4
Control: textbox checkbox combobox textbox
Control source: Married Relation place of birth (next field in grid)
The code behind the controls also shifts to the new column - regardless of the type of control that is there. The code that was "behind" the original control in the grid shift along with the control sources of each column.
This is the real killer - now all of the column numbers in the code behind these controls NO LONGER WORKS because the code still refers to the old column numbers. Example:
Thisform.PageFrame1.Page4.Grid1.Column3.combo1.text is now in Col2 , not Col3 ... and there's a LOT of code behind some of these controls.
The same thing occurs if I add a new field into the table betwee two existing fields.
Even more damage occurs if I go back and use the grid's builder again.
1) Is there a work around?
2) Can you edit the .sct file?
3) Can you remove a control from a column once you've added it to the column and set it as the "current control" ?
4) Does VFP 8 address this problem?
At this point, any and all suggestions on handling grids - especially concerning rearranging columns AND the behavior of the "builder" for grids would be greatly appreciated.
Thank You,
Dave
The 2nd mouse gets the cheese.