wsturdev
asked on
Hide/Show or Enable/Disable radiobuttons in datagrid column
I have a datagrid. Column 3 has 2 radio buttons aligned vertically. Depending on values in a hidden column, I want the set of radio buttons in column 3 to either show or not show. One row might have them showing and the next row might have them hidden.
Is this possible? If so, how do I do it from VB code? Or is it better done in ASP?
Alternatively, I could always have them showing but have them either enabled or disabled.
Is this possible? If so, how do I do it from VB code? Or is it better done in ASP?
Alternatively, I could always have them showing but have them either enabled or disabled.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The column itself will always be visible, while the radio buttons might or might not be visible, depending on the value for that row in the hidden column.
Hi wsturdev,
why dont you use ComboBox insted of radio buttons ???
why dont you use ComboBox insted of radio buttons ???
ASKER
Because the customer prefers a set of radio buttons, if possible. I can resort to combobox if necessary, but only if I positively not use radio buttons.
ASKER
But, even with a combobox, can I hide it/show it in different rows based on a value?
Hi Again,
it was just a suggestion ... BUT the Customer always right
with ComboBox you can add None,Yes,No [ None like Select nothing]
check this:
http://msdn2.microsoft.com/en-us/library/ms171619.aspx
Hope this work with you .
it was just a suggestion ... BUT the Customer always right
with ComboBox you can add None,Yes,No [ None like Select nothing]
check this:
http://msdn2.microsoft.com/en-us/library/ms171619.aspx
Hope this work with you .
ASKER
I am awarding you the points because your responses spurred some analysis and I found an answer. Rows either have the radiobuttons enabled or disabled based on a value from a hidden column.
Here is my solution, for the record:
Dim iRow As Integer
Dim iRowsToScan As Integer
iRowsToScan = QuestionDataGrid.Items.Cou nt
For iRow = 0 To iRowsToScan - 1
'Enable/Disable Yes-No
If QuestionDataGrid.Items(iRo w).Cells(6 ).Text = True Then
QuestionDataGrid.Items(iRo w).Cells(3 ).Enabled = True
Else
QuestionDataGrid.Items(iRo w).Cells(3 ).Enabled = False
End If
Next
Here is my solution, for the record:
Dim iRow As Integer
Dim iRowsToScan As Integer
iRowsToScan = QuestionDataGrid.Items.Cou
For iRow = 0 To iRowsToScan - 1
'Enable/Disable Yes-No
If QuestionDataGrid.Items(iRo
QuestionDataGrid.Items(iRo
Else
QuestionDataGrid.Items(iRo
End If
Next
Thanx for the points ... and i hope you make your Customer pleased ... ;)
ASKER
I want them to show/enable in row 1 of column 3 and the hide/disable in row 2 of column 3, depending upon a value in a hidden column 1, say.