This is a migrated thread and some comments may be shown as answers.

[Solved] Binding - CellTemplate, Converter

1 Answer 172 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jim
Top achievements
Rank 1
Jim asked on 17 Aug 2009, 04:43 PM

It appears that when I specify a converter on a control in a CellTemplate it does not work.

<telerikGrid:GridViewDataColumn HeaderText="Totalable"   
    DataMemberBinding="{Binding IsTotalable}" Width="Auto">  
    <telerikGrid:GridViewDataColumn.CellTemplate> 
        <DataTemplate> 
            <CheckBox IsChecked="{Binding IsTotalable, Mode=TwoWay}"   
                      Tag="{Binding}"   
                      Visibility="{Binding Path=TotalableIsAllowed,   
                      Converter={StaticResource BooleanToVisibilityConverter}}"  
                      IsEnabled="{Binding Path=TotalableIsAllowed}"/>  
        </DataTemplate> 
    </telerikGrid:GridViewDataColumn.CellTemplate> 
</telerikGrid:GridViewDataColumn> 

I believe that Converters are new to SL3 and they are pretty handy.

I can provide a more comprehensive example if this isn't enough.

Best Regards, Jim

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 19 Aug 2009, 06:56 AM
Hello Jim,

Generally IValueConverter is available in SL 2 also. I've checked your code however everything worked fine on my end - please check the attached project.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Jim
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or