cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to do Updown functionality on grid??

SOLVED
Highlighted
Regular Member

how to do Updown functionality on grid??

Hi,

 

I wanted to create a Up/Down functionality on grid as I can swap the ordering of rows in grid on clicking of button

can somebody please help me out how to create a service for this?

 

 

Thanks & Regards,

Khushboo jain,

Mestech Services Pvt Ltd

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to do Updown functionality on grid??

You could add a column that is the row number and then use that to move rows up and down.

selected data

sort by row number

show in grid

select grid row

hit up

selected grid row - row number into service

update grid row data

refresh data for grid

 

Truth be told this is incredibly inefficient but it will work

be nice to have this work client side and then a single update to the server when done.

 

an uglier way to do this,

get data

derivefields to add the index (or loop)

show in grid with index editable

edit grid index numbers

click update

3 REPLIES 3

Re: how to do Updown functionality on grid??

You could add a column that is the row number and then use that to move rows up and down.

selected data

sort by row number

show in grid

select grid row

hit up

selected grid row - row number into service

update grid row data

refresh data for grid

 

Truth be told this is incredibly inefficient but it will work

be nice to have this work client side and then a single update to the server when done.

 

an uglier way to do this,

get data

derivefields to add the index (or loop)

show in grid with index editable

edit grid index numbers

click update

Re: how to do Updown functionality on grid??

You could try with the "Grid Advanced" Widget.

It has tons of more features that the default Grid Widget - including sorting and filtering.

 

https://marketplace.ptc.com/apps/226764/grid-advanced---version-410#!overview

 

This might be easier than implementing it all on your own.

 

 

Cheers,

Michael

 

 

---

 

edit:

sorry - after reading again it seems like you're more interested in swapping the rows instead of just ordering them (ASC / DESC). Pai's answer has some good points on that :)

 

Re: how to do Updown functionality on grid??

@khushboo_jain

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel