Data Binding Problem

3 posts, 0 answers
  1. Md.Hasanuzzaman
    Md.Hasanuzzaman avatar
    31 posts
    Member since:
    Apr 2011

    Posted 13 Jul 2011 Link to this post

    I want to binding SumFunction with a textblock. But I don`t how to do it. Here is my XMAL Code:

    telerik:GridViewDataColumn Header="Amount" UniqueName="Amount" DataMemberBinding="{Binding Amount}">
                        <telerik:GridViewDataColumn.AggregateFunctions>
                            <telerik:SumFunction x:Name="MyTotal" Caption="Sum:" SourceField="Amount" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                    </telerik:GridViewDataColumn>



     <TextBlock Height="23" HorizontalAlignment="Right" Margin="0,28,98.377,0" x:Name="textBlock1" Text="{Binding "Need something to do", ElementName=radGridView1}" VerticalAlignment="Top" TextInput="textBlock1_TextInput" Width="79" d:LayoutOverrides="VerticalAlignment" />


    thank`s for Help
  2. Md.Hasanuzzaman
    Md.Hasanuzzaman avatar
    31 posts
    Member since:
    Apr 2011

    Posted 14 Jul 2011 Link to this post

    Is there any one to solve my Problem ?????
  3. Md.Hasanuzzaman
    Md.Hasanuzzaman avatar
    31 posts
    Member since:
    Apr 2011

    Posted 14 Jul 2011 Link to this post

    Problem is Solved . Here is solution 

    <telerik:GridViewDataColumn x:Name="shuvo" Header="Name" UniqueName="name" DataMemberBinding="{Binding name}" IsReadOnly="True">
                        <telerik:GridViewDataColumn.AggregateFunctions>
                            <telerik:SumFunction FunctionName="SumtoMe" x:Name="MyTotal" Caption="Sum:" SourceField="name" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                    </telerik:GridViewDataColumn>


     <TextBlock Height="23" Margin="233.623,151,-10,0" x:Name="textBlock1" Text="{Binding AggregateResults[SumtoMe], ElementName=radGridView1, Mode=OneWay}" VerticalAlignment="Top" DataContextChanged="textBlock1_DataContextChanged" TextInput="textBlock1_TextInput" />
Back to Top