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

Data Column Template Binding

1 Answer 99 Views
GridView
This is a migrated thread and some comments may be shown as answers.
dennis
Top achievements
Rank 1
dennis asked on 02 Mar 2010, 11:51 PM
Hi, im trying to bind a property to a templated datacolumn, but i dont get anything.

The radgridview is binding to a simple dataset.

<
Window x:Class="LogViewer.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
        Drop="Window_Drop" AllowDrop="True" 
        xmlns:local="clr-namespace:LogViewer">  
    <Grid> 
        <Grid.Resources> 
            <Style x:Key="customCell" TargetType="telerik:GridViewCell">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="telerik:GridViewCell">  
                            <TextBlock Text="{Binding type1}" />
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </Grid.Resources> 
        <telerik:RadGridView Name="radGridView1" AutoGenerateColumns="True" telerik:StyleManager.Theme="Vista">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="" TextAlignment="Center" 
                                            CellStyle="{StaticResource customCell}" IsSortable="False" Width="76" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 04 Mar 2010, 09:44 AM
Hello dennis,

I have tried to reproduce this issue but I could not. Does your business object have a property called "type1"?

I have prepared a small sample project with this and it binds correctly. Please take a look at it.

Can you modify my sample project so that the issue you are faced is reproduced. Then open a support ticket and send it back to us.

I hope this helps.

Regards,
Ross
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
dennis
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or