Skip to main content

Enable sorting but disable to user

Comments

3 comments

  • Dapfor Team

    Hi,

    Do you mean that the grid should display sort icons in columns, but the user is unable to change sorting by clicking on these columns?

    0
  • guest

    For example:

    I have a grid control, and set sort to false where user not allowed to perform the sorting, the row added as following

    A|B|C
    --------
    3|c|d
    1|e|f
    2|r|f

    but I wish the grid/data to be sorted (col A - ascending or wise), as following at the grid output, as well as when new data added.

    A|B|C
    --------
    1|e|f
    2|r|f
    3|c|d

    sort icons in columns visible can be by option?

    0
  • Dapfor Team

    Hi,
    In the next version of the grid we will add a mechanism to prevent the user from sort changing.

    To disable column sort icons use the next code:

    grid.PaintColumnCaption += delegate(object sender, PaintColumnCaptionEventArgs e)
    {
        e.Parts &= e.Parts ^ PaintPart.SortIcon;
    };

     
    Best regards,
    The Dapfor Team

    0

Please sign in to leave a comment.

Powered by Zendesk