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

Image column

1 Answer 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
piyush
Top achievements
Rank 1
piyush asked on 12 Aug 2010, 10:22 AM
Hi
I have 2 question for image column of a grid.
1 In below code snippet if I use GridViewColumn then image is shown in my grid.But if I use GridViewImageColumn then image is not shown in my grid.Why is this behaviour??
2 I want to set the source of image shown in below column dynamically/conditionally? How can I acheive this?
I have commented GridViewImageColumn as it is not working ...............

 

<telerik1:RadGridView.Column>
<telerik1:GridViewColumn UniqueName="AssetImage">
                                                    
<telerik1:GridViewColumn.CellTemplate>
                                                     
   
<DataTemplate

                                     <StackPanel Orientation="Horizontal">
                                                                <Image Stretch="None" Source="Images/HFundHFR.png"
                      Margin="0,0,5,0" />
                                                                  
                                                            </StackPanel>
                                                        </DataTemplate>
                                                    </telerik1:GridViewColumn.CellTemplate>
                                                </telerik1:GridViewColumn>
  
                                                <!--<telerik1:GridViewImageColumn    UniqueName="AssetImage">
                                                <telerik1:GridViewImageColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <StackPanel Orientation="Horizontal">
                                                            <Image Stretch="None"
                                                                Source="Images/HFundHFR.png"
                                                                Margin="0,0,5,0" />
                                                        </StackPanel>
                                                    </DataTemplate>
                                                </telerik1:GridViewImageColumn.CellTemplate>

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 12 Aug 2010, 04:00 PM
Hi piyush,

Could you please take a look at this forum thread.
If you want to create a dynamic CellTemplate that contains different image you could create the templatre in code.
If you want to add some specific behavior such as zoom in column,drag and drop you should create your own custom control with the associated logic and add it to the GridViewColumn's CellTemplate.
Please let me know if you need any additional information.

Regards,
Vanya Pavlova
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
Tags
GridView
Asked by
piyush
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or