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

Grouping, filtering Id (int) columns as Name (string)

1 Answer 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yaroslav
Top achievements
Rank 1
Yaroslav asked on 11 Nov 2011, 08:32 AM
Hello.
I have column:
<DataTemplate x:Key="CompanyNameDataTemlate">
            <StackPanel Orientation="Horizontal">
                <Button Click="CompanyNameButtonClick"  Margin="0,0,6,0" HorizontalAlignment="Center" VerticalAlignment="Center"  Background="Transparent"         BorderBrush="Transparent"         BorderThickness="0"  Padding="-4">
                    <Button.Content>
                        <Image Source="/ProMan;component/Images/Icons/Information16.png" Stretch="Fill"/>
                    </Button.Content>
                </Button>
                <TextBlock Text="{Binding CompanyName}"/>
            </StackPanel>
        </DataTemplate>
 
<telerik:GridViewDataColumn Header="EndUser" DataMemberBinding="{Binding CustomerId}" IsReadOnly="True"
                    UniqueName="EndUser" CellTemplate="{StaticResource CompanyNameDataTemlate}"
                    CellStyle="{StaticResource ReadOnlyCellStyle}"/>
It is everything ok, when simple displaing.
But when I want to filter records, or group them, I see CustomerIds (look at attached screenshot). The same situation if I have combobox column (binding by Id and showing Name) or GridViewDataColumn with Converter.
Is it possible to show Names instead Ids?

Also, is it possible to add button where is red dot on screenshot (button is needed for Collapse/Expand all action)?

1 Answer, 1 is accepted

Sort by
0
Yaroslav
Top achievements
Rank 1
answered on 15 Nov 2011, 02:38 PM
Sorry for UP.
Could you please give any advices for tasks described above?
Tags
GridView
Asked by
Yaroslav
Top achievements
Rank 1
Answers by
Yaroslav
Top achievements
Rank 1
Share this question
or