This is a migrated thread and some comments may be shown as answers.

Problem in Frozen both Main Grid and Details Grid

0 Answers 35 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 13 Jun 2013, 09:02 AM
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!

No answers yet. Maybe you can help?

Tags
GridView
Asked by
David
Top achievements
Rank 1
Share this question
or