Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Radio Buttons in a Grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00130735
Message ID:
00131135
Views:
13
David,

If by, "Is the OptionGroup properly bound to the table field", you mean the column's Bound property... it is set to .F. The radio buttons are purely conceptual...the have no direct representation in the database/table/view. It's only there to facilate the correct setting of the Closed field, and to enhance readability for the user.

The Column.Name = colProcess
The Column.Bound = .F.
The Column.ControlSource = (None)
The Column.CurrentControl = optProcess
The Column.Sparse = .F.

The OptionGroup.Name = optProcess
The OptionGroup.BorderStyle = 0 - None
The OptionGroup.ButtonCount = 3 (Complete, Active, Canceled)
The OptionGroup.ControlSource = (None)

The optCompleted.ControlSource = (None)
The optCompleted Click event does:
replace vpOrderItems_order_ID.Closed WITH DATETIME()
ThisForm.Refresh

The optActive.ControlSource = (None)
The optActive Click event does:
replace vpOrderItems_order_ID.Closed WITH {}
ThisForm.Refresh

The optCanceled.ControlSource = (None)
The optCanceled Click event does:
replace vpOrderItems_order_ID.Closed WITH {01/01/1900}
ThisForm.Refresh

(eventually I'll color code the rows: White for Active, Green for closed, red for canceled)

The blanking code affects only the current record.

I am using a parameterized view, vpOrderItems_Order_ID, parameterized on cOrder_ID (indicated by the last half of the view name).

-----------------
>Richard,
>
>Is the Column.Sparse set to .F.? Is the OptionGroup properly bound to the table field (you don't bind the OptionButtons)? Is your blanking code affecting all of the records? Are you using a relational grid or a parameterized view?
>---------------
>>The grid they are in contains order item information, including a date field (OrderItems.Closed), that indicates if the order is open or closed. When I click on the open it blanks out the date for the current record, which is what I want, but it also resets the radio buttons on all the other grid rows to the same value.
>>
>>How do I make it NOT reset all the other option groups in the column?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform