Programmatically Select and Move Rows to the Top

3 posts, 0 answers
  1. Robert LeGood
    Robert LeGood avatar
    28 posts
    Member since:
    Dec 2007

    Posted 11 Mar 2013 Link to this post

    Hi all,

    Just wondering if there was to programmatically select specific rows (that meet a criteria, for example), and then move those rows to the top of the grid.

    Specifically, I'm looking for a way to do this with a bound list.

    This thread was the closet I was able to find on the issue..
  2. Svett
    Svett avatar
    728 posts

    Posted 14 Mar 2013 Link to this post

    Hi Robert,

    It is not possible to reorder rows in bound mode. Nevertheless, you can use the sorting capabilities of
    RadGridView to achieve the desired behavior. You should read more about sorting here. In your case, you can create an invisible column which will represent the index of each row. Then you can sort by it. Finally, you can change the value of specific row for this column in the following manner:
    this.radGridView1.ChildRows[0].Cells["IndexColumn"].Value = 5;

    Note that you should use the ChildRows collection instead of the Rows collection, since it contains the rows in the order produced by a data operation(s) (filtering, sorting, grouping).

    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  3. jamsheer
    jamsheer avatar
    56 posts
    Member since:
    Feb 2017

    Posted 11 Dec 2017 Link to this post

    Hi all,

           How to move RdaGridView selected row Up/Down when keyup or keydown press.

      1.  The user selects one row
      2.  There will be up arrow and down arrow.
      3.  If the user wants to move up, the user clicks up arrow button
      4.  If the user wants to move down, then the user clicks down arrow button
      5.  If the row is at the top then up arrow button becomes disabled
      6.  If the row is at the bottom then down arrow button becomes disabled

    Hope you got my question



Back to Top