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

[Solved] How to enter url in ImageColumn of RADGridview in Silverlight

2 Answers 84 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.
Amit Jain
Top achievements
Rank 1
Amit Jain asked on 21 Jul 2010, 10:45 AM
hello,
        I'm new in the Silverlight Technology. I have used ImageColumn in the RADGridview control in Silverlight application in VS 2010.
Now, I don't know how to enter the url into "Source" attribute of ImageColumn of RADGridview. My code is as follows:
 
<Grid x:Name="LayoutRoot"> 
 <telerikGridView:RadGridView x:Name="RadGridView1" RowHeight="50" SelectionMode="Extended" AutoGenerateColumns="False"> 
    <telerikGridView:RadGridView.Columns> 
       <telerikGridView:GridViewColumn Header="Image"> 
           <telerikGridView:GridViewColumn.CellTemplate> 
               <DataTemplate> 
                    <Grid> 
                       <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="Auto"/> 
                            <ColumnDefinition Width="*"/> 
                       </Grid.ColumnDefinitions> 
                       <Image Grid.Column="0" Width="50" Height="50" Source="{Binding Image}"> 
                            <ToolTipService.ToolTip> 
                                <StackPanel Orientation="Vertical"> 
                                   <TextBlock Text="{Binding Image}"/> 
                                   <TextBlock Text="{Binding Name}"/> 
                                </StackPanel> 
                            </ToolTipService.ToolTip> 
                        </Image> 
                    <TextBlock Grid.Column="1" Text="{Binding Name}" VerticalAlignment="Center" /> 
                    </Grid> 
                </DataTemplate> 
            </telerikGridView:GridViewColumn.CellTemplate> 
        </telerikGridView:GridViewColumn> 
    </telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView> 
</Grid>
In the above Italic code, I want to give some url from the string property binding to the Image.
please help

2 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 21 Jul 2010, 11:51 AM
Hello Amit Jain,

You just have to enter the name of the string property in the binding expression for the Image element. For example:

<Image Grid.Column="0" Width="50" Height="50" Source="{Binding MyStringUrlProperty}">


Regards,
Milan
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
Amit Jain
Top achievements
Rank 1
answered on 21 Jul 2010, 11:53 AM
thanks for your reply...its done very well.
Tags
GridView
Asked by
Amit Jain
Top achievements
Rank 1
Answers by
Milan
Telerik team
Amit Jain
Top achievements
Rank 1
Share this question
or