I have a Form with a Grid.
In the Form I've created
- a property p_cOrderBy
- a method m_load() which creates a cursor named cr_data ordered by p_cOrderBy and does thisform.refresh(). Because I use VFP 6.0 I first create cursor cr_data in Form.load(). In Form.m_load() I zap cr_data, select the data in an array and use APPEND FROM ARRAY.
The Grid's recordSource is cursor cr_data.
The Form.init calls m_load(), so the Grid is populated by cr_data.
In de Grid.Columns(x).Header1.click event I put the code:
thisform.p_cOrderBy = [fieldname]
thisform.m_load()
Now, when running the form, initially i see the data in the Grid. But when clicking a Header, the Grid displays nothing, while the cursor cr_data contains the new ordered content.
Why is does and what should I do to see the new data .
In the Form I've created
- a property p_cOrderBy
- a method m_load() which creates a cursor named cr_data ordered by p_cOrderBy and does thisform.refresh(). Because I use VFP 6.0 I first create cursor cr_data in Form.load(). In Form.m_load() I zap cr_data, select the data in an array and use APPEND FROM ARRAY.
The Grid's recordSource is cursor cr_data.
The Form.init calls m_load(), so the Grid is populated by cr_data.
In de Grid.Columns(x).Header1.click event I put the code:
thisform.p_cOrderBy = [fieldname]
thisform.m_load()
Now, when running the form, initially i see the data in the Grid. But when clicking a Header, the Grid displays nothing, while the cursor cr_data contains the new ordered content.
Why is does and what should I do to see the new data .