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

static content in telerik GridView column

1 Answer 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lina fetisova
Top achievements
Rank 1
lina fetisova asked on 20 Apr 2010, 04:51 AM
<telerikGridView:RadGridView  Grid.Row="1" HorizontalAlignment="Left" x:Name="ClisentsListGrid"
                                      VerticalAlignment="Top" Height="auto" Width="auto" ItemsSource="{Binding}"
                                      AutoGenerateColumns="False" CanUserFreezeColumns="False"
                                      ScrollMode="RealTime" IsReadOnly="True" RowIndicatorVisibility="Collapsed"
                                      FontFamily="Verdana"
                                      UseLayoutRounding="True" ShowGroupPanel="False" Grid.ColumnSpan="2"
                                      telerik:Theming.Theme="Windows7"
                                      RowDetailsTemplate="{StaticResource ClientInfoRowDetailsTemplate}"
                                      RowLoaded="RadGridView1_RowLoaded">
            <telerikGridView:RadGridView.Resources>
                <Style x:Key="GridViewToggleButtonColumnStyle" TargetType="gridView:GridViewCell">
                    <Setter Property="Padding" Value="0,0,0,0" />
                </Style>
            </telerikGridView:RadGridView.Resources>

            <telerikGridView:RadGridView.Columns>
                <telerikGridView:GridViewToggleRowDetailsColumn CellStyle="{StaticResource GridViewToggleButtonColumnStyle}" />
                <telerikGridView:GridViewDataColumn UniqueName="FullName" IsReadOnly="True" Header="Полное название" />
                <telerikGridView:GridViewDataColumn UniqueName="City.Region.Name" IsReadOnly="True" Header="Регион"  />
                <telerikGridView:GridViewDataColumn UniqueName="City.Name" IsReadOnly="True" Header="Город"  />
                <telerikGridView:GridViewDataColumn UniqueName="Cell" IsReadOnly="True" Header="Телефон"  />
                <telerikGridView:GridViewDataColumn UniqueName="ContactPerson" IsReadOnly="True" Header="Контактное лицо"  />
                <telerikGridView:GridViewDataColumn UniqueName="User._IsApproved" IsReadOnly="True" Header="Активность"  />
            </telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView>


how can I put some extra content into columns? I want to put there some images (put them not using UniqueName) which are buttons with some onclick events?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 Apr 2010, 07:20 AM
Hello,

Why not use CellTemplate to define desired cell content for desired column? You can check this demo for more info.

Kind regards,
Vlad
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
lina fetisova
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or