Hi All
I have tried all manor of solutions to this problem.
Basically I have an attributes table which contains a type. this type is bound to a GridViewComboBoxColumn. when the selection in this column is changed, it needs to set the isvisible value of other columns in the same grid row.
So, in the usual way, I have created a converter such as this:
in the xaml, the converter is called like this:
The value for the cell is updated when the attribute_id is changed, but the visibility converter is never called.
the second option that I have tried is to use the GridViewdataColumn element, such as this:
gridAttributes_attributeType1 is the name of the GridViewComboBoxColumn.
This also does not call the converter as I suspect that the path SelectedValue does not exist in a GridViewComboBoxColumn.
The solution does call the converter however, if I bind it to a combo outside of the gridview..
Is there any solution to this problem.
Regards
Nick
I have tried all manor of solutions to this problem.
Basically I have an attributes table which contains a type. this type is bound to a GridViewComboBoxColumn. when the selection in this column is changed, it needs to set the isvisible value of other columns in the same grid row.
So, in the usual way, I have created a converter such as this:
| public class AttributeIntTypeToEnabledConverter : IValueConverter |
| { |
| public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
| { |
| if (value != null) |
| { |
| int count = (int)value; |
| if (count == 1) |
| return true; |
| else |
| return false; |
| } |
| else |
| { |
| return false; |
| } |
| } |
| public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
| { |
| return null; |
| } |
| } |
in the xaml, the converter is called like this:
| <telerikGridView:GridViewDataColumn x:Name="gridAttributes_attrValInt" Header="Value" |
| DataMemberBinding="{Binding attribute_id}" |
| IsVisible="{Binding attribute_id, Converter={StaticResource AttributeIntTypeToEnabledConverter}}"> |
The value for the cell is updated when the attribute_id is changed, but the visibility converter is never called.
the second option that I have tried is to use the GridViewdataColumn element, such as this:
| IsVisible="{Binding ElementName=gridAttributes_AttributeType1, Path=SelectedValue, Converter={StaticResource AttributeIntTypeToEnabledConverter}}" |
gridAttributes_attributeType1 is the name of the GridViewComboBoxColumn.
This also does not call the converter as I suspect that the path SelectedValue does not exist in a GridViewComboBoxColumn.
The solution does call the converter however, if I bind it to a combo outside of the gridview..
Is there any solution to this problem.
Regards
Nick