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

How to change default Edit icon?

3 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
saravanakumar subramaniam
Top achievements
Rank 1
saravanakumar subramaniam asked on 12 Dec 2011, 06:10 AM
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

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 12 Dec 2011, 09:55 AM
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 >>
0
Imran
Top achievements
Rank 1
answered on 27 Dec 2011, 09:53 PM
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
0
Maya
Telerik team
answered on 28 Dec 2011, 08:22 AM
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 >>

Tags
GridView
Asked by
saravanakumar subramaniam
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Imran
Top achievements
Rank 1
Maya
Telerik team
Share this question
or