Completed
Last Updated: 15 May 2017 06:49 by ADMIN
ADMIN
Dilyan Traykov
Created on: 22 Mar 2017 11:03
Category: GridView
Type: Bug Report
2
GridView: Reordering a non-resizable column to the right results in the column becoming resizable

Available in LIB version: 2017.2.515
1 comment
ADMIN
Dilyan Traykov
Posted on: 23 Mar 2017 16:08
The current workaround involves handling RadGridView's ColumnReordered event:

        private void RadGridView_ColumnReordered(object sender, GridViewColumnEventArgs e)
        {
            if (!e.Column.IsResizable)
            {
                Dispatcher.BeginInvoke((Action) (() =>
                {
                    var radGridView = e.Column.Parent;
                    foreach (var header in radGridView.ChildrenOfType<GridViewHeaderCell>())
                    {
                        if (header.Column.DisplayIndex == (e.Column.DisplayIndex + 1))
                        {
                            var leftGripper = header.ChildrenOfType<Thumb>().Where(x => x.Name == "PART_LeftHeaderGripper").First();
                            {
                                leftGripper.Visibility = Visibility.Collapsed;
                            }
                        }
                    }
                }), DispatcherPriority.Render);
            }
        }