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

Image and Text in Same Cell

1 Answer 276 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mehran
Top achievements
Rank 1
Mehran asked on 28 Jan 2015, 09:11 PM
hi
how can i use image and text in same Cell?
like this
(Image)-MyName
(Image)-ID
????

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Jan 2015, 05:11 PM
Hello Mehran,

Thank you for contacting us.

To achieve your goal you could use a CellTemplate like in the code snippet below:
<telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <StackPanel>
                <TextBlock Text="{Binding TextProp}"/>
                <Image Source="{Binding myImgSourcePath}"/>
            </StackPanel>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

For further reference please check the Setting Cell Template and Cell Edit Template documentation article.

Let me know if you need any further assistance.

Best Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Mehran
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or