Sort a range in DataView RRS feed

  • Question

  • Hi, there,

          The DataView has the built-in function of sort, filter for the underlying Datatable, yet now I want to just sort part of the DataView,

    A few rows, not the entire DataView, how would I do that? 

    I really appreciate any help~



    Wednesday, August 15, 2012 6:06 PM


  • Hi Joyce,

    Welcome to the MSDN Forum.

    So far, I haven't found a direct way. But, you can try this workaround:

    1. Copy the rows which need to be sorted to a datatable, named One.

    2. Copy the next rows which don't need to be sorted to a new datatable, named Two.

    3. Sort the datatable one.

    4. import the datatable two into datatable one.

    5. Datatable one's DefaultView is what you want.

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Wednesday, August 22, 2012 3:09 PM
    Thursday, August 16, 2012 8:21 AM