We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hierarchical GridDataBoundGrid Sorting issue.

Thread ID:

Created:

Updated:

Platform:

Replies:

109572 Jun 20,2013 12:47 PM UTC Jul 3,2013 04:19 AM UTC WinForms 4
loading
Tags: GridControl
Michal
Asked On June 20, 2013 12:47 PM UTC

There are two issues I'd like to solve:
- grid doesn't sort second (third, etc.) hierarchy level members (only first level)
- grid collapse each time I changed sort order (column double click)
Any help would be greatly appreciated :)

Michal
Replied On June 20, 2013 12:48 PM UTC

version 9.4

Michal
Replied On June 21, 2013 12:10 PM UTC

            CurrencyManager cm = BindingContext[grid.DataSource, grid.DataMember] as CurrencyManager;
            if (cm != null)
            {
                var defaultView = cm.List as DataView;

                int pos = grid.Model.RowCount;
                for (int i = 0; i < pos; i++)
                {
                    GridBoundRecordState rs = grid.Binder.GetRecordStateAtRowIndex(i);
                    bool True = rs.HasChildList;
                    if (True)
                    {
                        var view = rs.ChildList as DataView;
                        if (view != null)
                        {
                            if (defaultView != null)
                            {
                                view.Sort = defaultView.Sort;
                            }

                            grid.RefreshRange(GridRangeInfo.Rows(i, i + rs.ChildCount));
                            i += rs.ChildCount;
                        }
                    }
                }
            }

Sorting solved ;), still looking for auto-collapsing work around.


Athiram S [Syncfusion]
Replied On June 25, 2013 03:46 AM UTC

Hi Michael,

We are working on this query. we will update with details as soon as possible.

Regards,
Athiram S

Athiram S [Syncfusion]
Replied On July 3, 2013 04:19 AM UTC

Hi Michael,

Sorry for delay in getting back to you.

Please refer to the following forum link for details:


A sample is present in this link. Kindly, refer to the sample for details.

Please let me know if you have any concerns.

Regards,
Athiram S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;