How to change default Edit icon?

4 posts, 0 answers
  1. saravanakumar subramaniam
    saravanakumar subramaniam avatar
    28 posts
    Member since:
    May 2010

    Posted 12 Dec 2011 Link to this post

    Hi,

    I am using Grid to show some data and in edit mode of the grid i can find "Edit icon" on the grid. But i need to display different edit icon than default icon.
    Is there a way that we can change the default edit icon for the grid.

    Thanks
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1216 posts

    Posted 12 Dec 2011 Link to this post

    Hi Saravanakumar Subramaniam,

    You can easily achieve this by modifying GridViewRow's template, changing the default edit indicator. I have prepared an example project for you that illustrates how to implement this. For your convenience, I have placed several comment lines that indicate the applied changes.

    Regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. Imran
    Imran avatar
    4 posts
    Member since:
    Nov 2010

    Posted 27 Dec 2011 Link to this post

    I am kinda in the need of same, but I am wondering how can I have two extra columns as "Edit" and "Delete" in the grid with edit and delete icons in each cell for those columns.

    Thanks,
    Imran
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 28 Dec 2011 Link to this post

    Hello Imran,

    Generally, you could edit the template in a similar manner as illustrated in the attached sample. If you want those buttons to be displayed in the indicator presenter no matter if the row is in edit mode or not, you can edit the NavigatorIndicator element:

    <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" Height="11" Visibility="Collapsed" VerticalAlignment="Center" Width="11">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                        <!-- I have added this Rectangles to illustrate the change-->
                                        <Rectangle Height="10" Width="10" Fill="Red" />
                                        <Rectangle Height="10" Width="10" Fill="Yellow" Grid.Column="1"/>
                                        <Rectangle Height="10" Width="10" Fill="Blue" Grid.Column="2"/>
                                        <!--<Path Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z " Fill="{StaticResource GridView_NavigatorIndicatorBackground}" HorizontalAlignment="Center" Height="8" Margin="0" Stretch="Fill" VerticalAlignment="Center" Width="8"/>-->
                                    </Grid>
      
    In this case the elements defined are Rectangles, but you can place buttons in the same way.
    Is that the behavior that you require ? 

    All the best,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top