Problem in Frozen both Main Grid and Details Grid

1 posts, 0 answers
  1. David
    David avatar
    4 posts
    Member since:
    May 2012

    Posted 13 Jun 2013 Link to this post

    Hi,

    We are meeting with a problem in gridview.  Those gridviews contain rowdetails and the details is also a gridview, however, the details gridview will not show scrollbar.  The problem is that we need to frozen both the first two columns in main gridview and the first column in details gridview, and use the scrollbar in main gridview to control the movement of both main gridview and details gridview.  Hope I have explained it clearly.
    The way we attempted is to pass the HorizontalOffset of the main gridview to the details gridview.  Something like below, the event is registered for main gridview ScrollChanged.

    private void scroll_Detail(object sender, ScrollChangedEventArgs e)
    {
        if (_radList != null)
        {
            if (e.HorizontalChange != 0)
            {
                foreach (RadGridView t in _radList)
                {
                    GridViewScrollViewer scrollDetail = t.FindChildByType<GridViewScrollViewer>();
                    if (scrollDetail != null)
                    {
                        scrollDetail.ScrollToHorizontalOffset(e.HorizontalOffset);
                    }
                }
            }
        }
     
        e.Handled = false;
    }

    But it does not work as we want.  Do you have an good ideas?

    Thanks!
Back to Top