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.
Unfortunately, activation email could not send to your email. Please try again.

Hierarchical GridDataBoundGrid Sorting issue.

Thread ID:

Created:

Updated:

Platform:

Replies:

109572 Jun 20,2013 08:47 AM Jul 3,2013 12:19 AM Windows Forms 4
loading
Tags: GridControl
Michal
Asked On June 20, 2013 08:47 AM

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 08:48 AM

version 9.4

Michal
Replied On June 21, 2013 08:10 AM

            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 24, 2013 11:46 PM

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 12:19 AM

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.

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.

;