Xamarin.Android | ComponentOne
Controls / FlexGrid / Features / Reordering Rows and Columns
In This Topic
    Reordering Rows and Columns
    In This Topic

    Reordering of rows and columns is a very common scenario when handling and analyzing the data in a grid. FlexGrid provides reordering by dragging the header cells at run-time. The feature is available by default and user can drag and reorder the rows and columns both with a very smooth transition which is important to enhance the overall user experience.

     

    However, you can change this behavior to limit dragging only to rows, or columns or to disable it completely. This can be achieved by using the AllowDragging property of the FlexGrid class which accepts the values from GridAllowDragging enumeration. You can also disable reordering of a particular row or column by setting the AllowDragging property of the GridRow or GridColumn class respectively.

    The following code snippet shows how you can disable column reordering in the FlexGrid control.

    C#
    Copy Code
    // Disable column reordering
    grid.AllowDragging = GridAllowDragging.None;