Rows Re order issue

10 posts, 0 answers
  1. Surendar S
    Surendar S avatar
    33 posts
    Member since:
    Nov 2009

    Posted 21 Oct 2010 Link to this post

    Hi,
        I want to reorder the rows within a grid with few condition. For example, i have 10 records in the grid.
    The first 2 records should not reordered.
    From the 3rd to 10th record, they can be re ordered between themselves and not with record 1 and 2. How should i acheive this?
    Is there any event to handle the Reorder event?
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Oct 2010 Link to this post

    Hi, 

    You can pin rows which will satisfy your requirement to keep the two rows at the top
    see this link for more information. 

    You can re-order rows in a rad grid view by dragging them, by setting the 
    Me.RadGridView.AllowRowReorder = true
    but this will only work in unbound mode. 

    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Surendar S
    Surendar S avatar
    33 posts
    Member since:
    Nov 2009

    Posted 21 Oct 2010 Link to this post

    Hi Richard,
            Thanks. It worked for me.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Oct 2010 Link to this post

    Great!
    Please remember to mark as answer so others can quickly find the solution
    All the best
    Richard
  6. Surendar S
    Surendar S avatar
    33 posts
    Member since:
    Nov 2009

    Posted 21 Oct 2010 Link to this post

    HI Richard,
        One more issue with the same grid. Now i have 30 records in the grid and If the grid can hold 15 records in one page(due to my screen size) and all my first 15 are pinned? i could not see the remaining records. Is there any other way to solve this issue?
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Oct 2010 Link to this post

    Hi, 

    As far as I'm aware this is the behaviour of the Pinned row. So you would need to know the max number of rows that you can fit on the screen and leave at least one row free at the bottom for showing the unpinned rows that you can scroll. 

    I'll see if there's a workaround but at the moment, I can't imagine one. 

    Richard
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Oct 2010 Link to this post

    I know this isn't really what you need to solve the issue, but you would get more space (i.e. - be able to fit more rows on at your screen resolution) if you set AutoSizeRows to True (based on standard text size in the cells. 
    Me.RadGridView.AutoSizeRows = True

    Richard
  9. Surendar S
    Surendar S avatar
    33 posts
    Member since:
    Nov 2009

    Posted 21 Oct 2010 Link to this post

    Hi Richard,
        I dont think the above solution works for me since if i reorder the row that is the only row in my screen(due to my screen size, i have also have many records which will not be shown) not pinned then my application crashes.please refer my another post for the crash issue.
    http://www.telerik.com/community/forums/winforms/gridview/rad-drag-drop-issue.aspx


    With Regards,
    Surendar S
  10. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Oct 2010 Link to this post

    Hi, 

    At the moment I'm out of ideas for your pinned rows. If you could mark your original question with the answer I'd appreciate that. 
    I'd advise opening a support ticket for the scrolling / drag drop issue. 

    The pinned rows is behaving as I'd expect and I wouldn't imagine that a pinned row should become unpinned because of lack of screen estate. 
    Apologies I haven't come up with a better answer for you. 
    Richard
  11. Manesh
    Manesh avatar
    24 posts
    Member since:
    Feb 2012

    Posted 25 Jun 2013 Link to this post

    While reordering the rows in rad grid the scroll bar is not moving

    Example : - 

    i'm having 37 rows and scrolling is also shown and 

    now see the pic 1 : i'm selecting one row and moving it down

    now see the pic 2 : you can see the selected row is visible up to the height of the grid view

    now see the pic 3 : if you still move the selected row down, its moving down but the scroll bar is not moving parallel and the selected row is not visible to the user
Back to Top
UI for WinForms is Visual Studio 2017 Ready