Pages

Friday 18 February 2011

Telerik radgridview in silverlight

 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

<telerik:RadGridView x:Name="RadGridView1" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" Loaded="RadGridView1_Loaded" AutoGenerateColumns="False" RowDetailsVisibilityMode="VisibleWhenSelected" CanUserFreezeColumns="False">
                            <telerik:RadGridView.Columns>
                                <!--<telerik:GridViewDataColumn Header="Sl No" DataMemberBinding="{Binding Slno}" />-->
                                <!--<telerik:GridViewComboBoxColumn Header="Provision Name" Width="200"
                                   DataMemberBinding="{Binding Provision, Mode=TwoWay}"
                                   UniqueName="Provision"
                                   ItemsSourceBinding="{Binding Provision}"
                                   SelectedValueMemberPath="ProvisionId"
                                                               
                                   DisplayMemberPath="Provision" x:Name="CMBProvision">
                                   
                                </telerik:GridViewComboBoxColumn>

                                <telerik:GridViewComboBoxColumn x:Name="CMBResidual" Header="ResidualFee Name" Width="200"
                                  DataMemberBinding="{Binding Residualfee, Mode=TwoWay}"
                                   UniqueName="Residualfee"
                                   ItemsSourceBinding="{Binding Residualfee}"
                                   SelectedValueMemberPath="ResidualfeeId"
                                   DisplayMemberPath="Residualfee" >

                                </telerik:GridViewComboBoxColumn>-->
                                <telerik:GridViewDataColumn Header="Provision Name" Width="200" DataMemberBinding="{Binding Provision, Mode=TwoWay}" >
                                    <telerik:GridViewDataColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Provision}" />
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <TextBox x:Name="TxtProvisionnames" Text="{Binding Provision}" SelectionChanged="TxtProvisionnames_SelectionChanged"></TextBox>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>


                                </telerik:GridViewDataColumn>


                                <telerik:GridViewDataColumn Header="ResidualFee Name" Width="200" DataMemberBinding="{Binding Residualfee, Mode=TwoWay}" >
                                    <telerik:GridViewDataColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Residualfee}" />
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <TextBox x:Name="TxtResidualfeenames" Text="{Binding Residualfee}" SelectionChanged="TxtResidualfeenames_SelectionChanged"></TextBox>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>


                                </telerik:GridViewDataColumn>
                                <!--<telerik:GridViewColumn Width="150">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate x:Name="dtupdate">
                                          
                                            <HyperlinkButton x:Name="BtnUpdates" Content="Update" Tag="{Binding Slno}"
                                                FontWeight="Normal" Click="BtnUpdates_Click"></HyperlinkButton>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewColumn>-->



                                <telerik:GridViewColumn Width="150">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate x:Name="dtDelete">
                                            <!--<telerik:RadButton Content="Update" Width="80" Height="30" Name="BtnUpdates" Click="BtnUpdates_Click"></telerik:RadButton>-->
                                            <HyperlinkButton x:Name="hypDelete" Content="Delete" Tag="{Binding Slno}"
                                                FontWeight="Normal" Click="hypDelete_Click"></HyperlinkButton>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewColumn>

                            </telerik:RadGridView.Columns>

                        </telerik:RadGridView>
                        <sdk:DataPager x:Name="dataPager"
                                    Source="{Binding Path=ItemsSource,ElementName=RadGridView1}"
                        PageSize="6"    DisplayMode="FirstLastPreviousNext" ></sdk:DataPager>

No comments:

Post a Comment