Rad GridView column total not updating on data update

4 posts, 0 answers
  1. Doug
    Doug avatar
    3 posts
    Member since:
    Dec 2013

    Posted 03 Dec 2013 Link to this post

    Hello,

    Is there a way to refresh the column footer when the data in the grid is changed by an outside source? For example, if there was a details drawer that opens on the gridline and has a text box that is bound to the same data as the parent grid cell?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Dec 2013 Link to this post

    Hi,

    You can invoke the RadGridView.CalculateAggregates() method to achieve your goal.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Doug
    Doug avatar
    3 posts
    Member since:
    Dec 2013

    Posted 03 Dec 2013 Link to this post

    Where would I invoke this method? 
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 04 Dec 2013 Link to this post

    Hi,

    You should invoke it after the data in the grid is changed outside it.

    For example you can subscribe for the LostFocus event of the TextBox and update the aggregates when you click outside of the TextBox.
    For example:
    private void TextBox_LostFocus(object sender, RoutedEventArgs e)
    {
        this.Dispatcher.BeginInvoke(new Action(() =>
        {
     
        this.clubsGrid.Rebind();
        }
        ));
    }

    Then the aggregate result will be updated.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top