Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with combobox in grid and pageframe
Message
From
20/07/2006 10:38:47
 
 
To
20/07/2006 08:42:02
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Oracle
Miscellaneous
Thread ID:
01137212
Message ID:
01138055
Views:
15
Note: I am using the Visual Promatrix framework.

The pageframe will have as many pages as there are warehouses in the warehouse table in oracle. The pages are added at application startup. When the user clicks on a specific page the page's activate code is run which does the following:

ThisForm.LockScreen = .T.
This.Refresh()
This.Parent.Click()
ThisForm.LockScreen = .F.

The pageframe click method determines the warehouse code based on the specific page that was clicked using a table lookup. Next a refresh grids and menu procedure is called that requeries the parameterized views (VPM thing) which has cursor adapters connecting to the Oracle database. The grid datasource is requeried, the parameterized view that the vehicle column is based on is requeried, then the column in the grid is requeried (thisform.column5.cboVehicleCode.requery()). A refresh is next done on the grid itself after repositioning to a record in the view the grid is based on.

I added the display of the curent value of the combobox. It displayed the value there correctly. But displayed it twice and the change to the second warehouse displayed the same recods as the first warehouse (did not display the records from the second warehouse) and the value displayed in the combobox is now blank.

The combobox has code in the valid event that will only change the value of the underlying record if the vehicle code changes.

>If you put code in the pages' click method to view the current value of the combobox when that occurs, is it correct? Or has the value changed from the value that it was before the user clicked on the dropdown but didn't select a new value? If the values in the grid are actually changing, then code somewhere is refreshing the grid to the wrong values. How is the grid actually populated? Is it a filtered table, a query, or what? Where is the code that actually populates the grid? Is it in the combobox? If so, what method is it in? You may want to look at moving that code so it only gets run when the user actually selects a different item from the combobox...
>
>
>>Yes it is a drop down list.
>>
>>>What is the style for the combobox? Is it 2-DropDown List?
>>>
>>>
>>>>In my application I have a pageframe with one or more tabs. Sitting on top of the pageframe (not in) is a grid which has a combobox in one of the columns. Clicking on a tab in the pageframe changes the filter on the data in the grid to a different warehouse. The combobox is used to change the vehicle for a route.
>>>>
>>>>The problem I am having is if the user clicks on the combobox pulling down the list to choose from but instead of clicking on an item from the list the user clicks on a different tab in the pageframe. The result that happens is that the pageframe shows the other warehouse but the data displayed in the grid is a slightly messed up version of the data that was displayed in the warehouse the user was just on. I have code that requeries the cursor adapters for the new warehouse when the user clicks on pageframe tab.
>>>>
>>>>Is there something to look at to solve this situation or is there a way to prevent the user from exiting the combobox in this fashion?
Previous
Reply
Map
View

Click here to load this message in the networking platform