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

Datagrid conversion

1 Answer 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shabbir Hussain
Top achievements
Rank 1
Shabbir Hussain asked on 01 Jun 2010, 08:17 AM
Sir, 
    I find two much but I am unable to convert this code correctly for RADGrid view.
Kindly help me.
 

<

 

 

sdk:DataGrid AutoGenerateColumns="False" Name="dataGrid1" IsReadOnly="True">

 

 

 

 

    <sdk:DataGrid.Columns>

 

 

 

 

        <sdk:DataGridTextColumn Binding="{Binding UserID}" Header="Login ID"></sdk:DataGridTextColumn>

 

 

 

 

        <sdk:DataGridTemplateColumn SortMemberPath="FirstName;LastName" Header="User Name" Width="150">

 

 

 

 

            <sdk:DataGridTemplateColumn.CellTemplate>

 

 

 

 

                <DataTemplate>

 

 

 

 

                    <StackPanel Orientation="Horizontal">

 

 

 

 

                        <TextBlock Text="{Binding Path=FirstName}"></TextBlock>

 

 

 

 

                        <TextBlock Text=" "></TextBlock>

 

 

 

 

                        <TextBlock Text="{Binding Path=LastName}"></TextBlock>

 

 

 

 

                    </StackPanel>

 

 

 

 

                </DataTemplate>

 

 

 

 

            </sdk:DataGridTemplateColumn.CellTemplate>

 

 

 

 

        </sdk:DataGridTemplateColumn>

 

 

 

 

        <sdk:DataGridTextColumn Binding="{Binding StreetAddress}" Width="200" Header="Street Address">

 

 

 

 

        <sdk:DataGridTextColumn.ElementStyle>

 

 

 

 

            <Style TargetType="TextBlock">

 

 

 

 

                <Setter Property="TextWrapping" Value="NoWrap"></Setter>

 

 

 

 

                <Setter Property="HorizontalAlignment" Value="Left"></Setter>

 

 

 

 

                <Setter Property="VerticalAlignment" Value="Top"></Setter>

 

 

 

 

                <Setter Property="Height" Value="15"></Setter>

 

 

 

 

            </Style>

 

 

 

 

        </sdk:DataGridTextColumn.ElementStyle>

 

 

 

 

    </sdk:DataGridTextColumn>

 

 

 

 

    <sdk:DataGridTextColumn Binding="{Binding City}" Header="City"></sdk:DataGridTextColumn>

 

 

 

 

    <sdk:DataGridTextColumn Binding="{Binding State}" Header="State"></sdk:DataGridTextColumn>

 

 

 

 

    <sdk:DataGridTextColumn Binding="{Binding ZipCode}" Header="Zip Code"></sdk:DataGridTextColumn>

 

 

 

 

    <sdk:DataGridTextColumn Binding="{Binding Email}" Header="Email"></sdk:DataGridTextColumn>

 

 

 

 

    <sdk:DataGridTextColumn Binding="{Binding CellPhone}" Header="Cell Phone"></sdk:DataGridTextColumn>

 

 

 

 

    <sdk:DataGridCheckBoxColumn Binding="{Binding IsActive}" Header="Active"></sdk:DataGridCheckBoxColumn>

 

 

 

 

 

</sdk:DataGrid.Columns>

 

 

 

 

</sdk:DataGrid>

 

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 01 Jun 2010, 09:02 AM
Hello Shabbir Hussain,

You can use as a reference our online demos that enable you to see both the application and its code. 
I hope that helps you.
 

Sincerely yours,
Maya
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
Shabbir Hussain
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or