Is possible margin/padding in GridViewImageColumn?

2 posts, 0 answers
  1. Mikel
    Mikel avatar
    21 posts
    Member since:
    Feb 2014

    Posted 29 Feb 2016 Link to this post



    Just a question. Is possible to set margin directly to image of GridViewImageColumn? Something like:



    If there isn't any property for do that, Should I modify datatemplate for apply it?


    Thank you! Regards!

  2. Stefan
    Stefan avatar
    1073 posts

    Posted 02 Mar 2016 Link to this post

    Hi Mikel,

    Such visual modification can be achieved by defining a Style targeting GridViewCell and setting the Padding property. This style can be applied by the CellStyle property of the column as follows.
    <Style TargetType="telerik:GridViewCell"
        <Setter Property="Padding" Value="5"/>

    <telerik:GridViewImageColumn DataMemberBinding="{Binding Image}"
                                 CellStyle="{StaticResource imageCellStyle}"/>

    In addition, you can check out the Styling Cells topic

    Hope this helps.

    Best Regards,
    Stefan X1
    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 Feedback Portal and vote to affect the priority of the items
Back to Top