Using ToHtml method of RadGridView

1 posts, 0 answers
  1. Bun
    Bun avatar
    2 posts
    Member since:
    Mar 2012

    Posted 22 Mar 2012 Link to this post

    I would like to ask you in the forum about the using the ToHtml method of RadGridView. Actually, It uses to generate the RadGridView to the HTML and my question in the RadGridView I use the GridViewDataColumn.AggregateFunctions to sum the value of one field when I do the grouping of other field and I want to generate what we have done in the RadGridView to the HTML by using ToHtml method and I can generate to HTML but It doesn't show Sum Value field. So how can I do it?
    Here is my code :

                    <telerik:RadGridView Grid.ColumnSpan="2" Grid.Row="3" HorizontalAlignment="Left" Name="radGridViewReceival" VerticalAlignment="Top" AutoGenerateColumns = "False"
                    ItemsSource="{Binding ElementName=domainDataSourceReceivalDetail, Path=Data, Mode=TwoWay}" AutoExpandGroups="True"
                    ElementExporting="radGridViewReceival_ElementExporting">
                    <telerik:RadGridView.Columns>
                        <ctl:CtlGridViewRowNumberColumn Header="ល.រ"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Product.ProductCode}" Header="លេខកូដទំនិញ"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ProductId, Converter={StaticResource ProductConverter}, ConverterParameter=Description1}" Header="ឈ្មោះទំនិញ" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Receival.VendorId, Converter={StaticResource ContactConverter}}" Header="អ្នកផ្គត់ផ្គង់ទំនិញ"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Quantity}" Header="បរិមាណ">
                            <telerik:GridViewDataColumn.AggregateFunctions>
                                <telerik:SumFunction SourceField="Quantity" Caption="បរិមាណសរុប :"/>
                                <local:SumStockInFunction Caption="តំលៃសរុប : " />
                            </telerik:GridViewDataColumn.AggregateFunctions>
                        </telerik:GridViewDataColumn>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding SmallestQuantityAvailable}" Header="ចំនួនទំនិញនៅសល់"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding UnitPrice}" Header="តំលៃមួយឯកកតា"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Unit.Description}" Header="ឯកតា"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Receival.Date, StringFormat='\{0:dd-MMM-yyyy\}'}" Header="ថៃ្ងទទួលបាន"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Remark}" Header="កំណត់សំគាល់"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>

    Thanks you guys all in advance.
Back to Top