Image Not being shown in the button

2 posts, 1 answers
  1. Siddhant
    Siddhant avatar
    22 posts
    Member since:
    Jan 2013

    Posted 22 Jan 2013 Link to this post

    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>
  2. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 22 Jan 2013 Link to this post

    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.

  3. DevCraft banner
Back to Top