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

Image Not being shown in the button

1 Answer 38 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Siddhant
Top achievements
Rank 1
Siddhant asked on 22 Jan 2013, 06:15 AM
I am trying to create a button in a data bound coulumn of a gridview. But the issue is that the image is not coming inside the button

<telerik:GridViewColumn Width="40" TextAlignment="Left">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                                <telerik:RadButton x:Name="btnDel" IsEnabled="{Binding flag,Converter={StaticResource ButtonEnableConvertor}}" Command="telerik:RadGridViewCommands.Delete"
                                                   CommandParameter="{Binding}" Click="btnDel_Click" HorizontalAlignment="Left" VerticalAlignment="Stretch"
                                                   Width="37" Height="25" Margin="-5,0,0,0" CornerRadius="5">
                                    <Image Source="/Includes/btnDel.png" Height="20" Width="30" />
                                </telerik:RadButton>
                            </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 22 Jan 2013, 02:50 PM
Hello Siddhant,

I tried to reproduce your scenario on our side with our latest official release and it seems that the code works as expected. Can you please verify that the path in the Source property of the Image control is the one that you need. Please take a look at the attached project and let me know if I missed something.

All the best,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Buttons
Asked by
Siddhant
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or