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

Converter={StaticResource }} function not working

2 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kumar p
Top achievements
Rank 1
kumar p asked on 26 May 2010, 02:35 PM
 hi,
 i am trying to  add Converter={StaticResource LevelToVisibility} function based on the marks either i should show the marks  or not.?

in xaml  code
i have  added

xmlns:local="clr-namespace:RadGrid"
<UserControl.Resources>
     <local:LevelToVisibilityConverter x:Key="LevelToVisibility"/>
     </UserControl.Resources>



<Button x:Name="btn" Width="24"    Visibility="{Binding Marks, Converter={StaticResource LevelToVisibility}}"
                            Click="btn_Click" >
                                                <Image  x:Name="img1" Source="Images/la1.png"  Stretch="None"
                Visibility="{Binding Marks, Converter={StaticResource LevelToVisibility}}"  />
                                            </Button>
  the   above  code  works  fine in silverlight 4. but when added the same  code in
 i have  an  LevelToVisibilityConverter class also defined  where i  do the checking the  condition based on that image gets binded

 rad gridview i am getting an error.
 is there any setting that i  need  to  do or  wat?

 any solution that leads  me   would be great
 thanks

kumar

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 26 May 2010, 02:38 PM
Hi kumar p,

Can you please paste the full xaml and the full c#  and specify the error message you get.
This will allow me to give more adequate answer.

Kind regards,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
kumar p
Top achievements
Rank 1
answered on 26 May 2010, 02:42 PM
sorry  it was  my mistake
 in class   file  i  did not this  line
public class LevelToVisibilityConverter : System.Windows.Data.IValueConverter
    {

}
 thanks
 kumar



Tags
GridView
Asked by
kumar p
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
kumar p
Top achievements
Rank 1
Share this question
or