How to lock first column to prevent it's shifting?

5 posts, 0 answers
  1. Valdo
    Valdo avatar
    26 posts
    Member since:
    Aug 2010

    Posted 29 Sep 2011 Link to this post

    Hi! I need to allow reordering of columns in my grid, but I want first column to remain always first, i.e. user cannot insert any column before it. Is there any way I can do this?

    PS I tried interactive mode and ColumnsReordering event to cancel it, but e.Column.DisplayIndex is already equals to e.NewDisplayIndex in that case and e.Cancel doesn't affect anything.
  2. Frank
    Frank avatar
    5 posts
    Member since:
    Jun 2012

    Posted 30 Sep 2011 Link to this post

    Try adding

    FrozenColumnCount ="1"
    to the XAML for the grid control, this should freeze the first column. it works from left to right.

    Frank

     

     

  3. Valdo
    Valdo avatar
    26 posts
    Member since:
    Aug 2010

    Posted 30 Sep 2011 Link to this post

    FrozenColumnCount is completely different thing. It only affects scrolling. And i need reordering which is performed by user.
  4. Frank
    Frank avatar
    5 posts
    Member since:
    Jun 2012

    Posted 30 Sep 2011 Link to this post

    i just tryied this and it seems to work put

    IsReorderable = "False"
    on the first column

    Frank

     

     

     

  5. Valdo
    Valdo avatar
    26 posts
    Member since:
    Aug 2010

    Posted 30 Sep 2011 Link to this post

    Try to drag it before first column, not on top of it. It doesn't work.
    PS> Don't forget to set reorder mode = Interactive for the grid.
Back to Top