This is a migrated thread and some comments may be shown as answers.

Rows Re order issue

9 Answers 283 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Surendar S
Top achievements
Rank 1
Surendar S asked on 21 Oct 2010, 11:40 AM
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?

9 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 21 Oct 2010, 11:56 AM
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
0
Surendar S
Top achievements
Rank 1
answered on 21 Oct 2010, 12:20 PM
Hi Richard,
        Thanks. It worked for me.
0
Richard Slade
Top achievements
Rank 2
answered on 21 Oct 2010, 12:21 PM
Great!
Please remember to mark as answer so others can quickly find the solution
All the best
Richard
0
Surendar S
Top achievements
Rank 1
answered on 21 Oct 2010, 12:43 PM
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?
0
Richard Slade
Top achievements
Rank 2
answered on 21 Oct 2010, 01:00 PM
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
0
Richard Slade
Top achievements
Rank 2
answered on 21 Oct 2010, 01:07 PM
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
0
Surendar S
Top achievements
Rank 1
answered on 21 Oct 2010, 01:19 PM
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
0
Richard Slade
Top achievements
Rank 2
answered on 21 Oct 2010, 02:10 PM
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
0
Manesh
Top achievements
Rank 2
answered on 25 Jun 2013, 12:46 PM
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
Tags
GridView
Asked by
Surendar S
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Surendar S
Top achievements
Rank 1
Manesh
Top achievements
Rank 2
Share this question
or