Home Forums WPF controls Xceed DataGrid for WPF Problem with Column Order(VisiblePosition) v2.0

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26186 |

    This is already noted to Xceed team through priority support
    but just in case you have the same problem I did.

    There is a Problem with v2.0 and the VisiblePosition of columns.
    If you have hidden columns and you start changing the VisiblePosition of Columns
    (inside or outside of a BeginInit/EndInit)
    As you change the visibleposition of columns it will change the position of others in odd ways.

    A Work Around is to set the visible position of all columns in order.
    or in C# 3.5 Linq

    var rs = from s in ctx.GridSettings
    where s.UserName == username
    && s.TableName == tablename
    orderby s.VisiblePosition
    select s;
    foreach (GridSetting gs in rs)
    {
    if (grid.Columns[gs.ColumnName] != null)
    grid.Columns[gs.ColumnName].VisiblePosition = gs.VisiblePosition ?? 0;
    }

    Imported from legacy forums. Posted by MiddleTommy (had 1935 views)

    Xceed Support
    Member
    Post count: 5658

    This is just a notification that a fix for this bug has been checked-in and should be available in the next service release.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2592 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.