DynamicGrid icon indicating copy to clipboard operation
DynamicGrid copied to clipboard

Setting which column to move

Open ljcleyba opened this issue 11 years ago • 2 comments

Hi, Is there a way to restrict column 1 to not be moved? I'm trying to make a meal planner chart wherein the user can move meals from a day to another. The first column is the column for dates, and must not move. Is there any way I can do this with your DynamicGrid? Thanks in advance.

ljcleyba avatar Sep 15 '14 03:09 ljcleyba

Hi,

You can overwrite in your adapter class the method canReorder and return false to all element in the first position.

 @Override
 public boolean canReorder(int position)
 {
        // if you have 3 columns 
        if ((position + 1) % 3 == 1)
            return false;
        else
            return true;
 }

Note: it's not tested! it's only an idea.

eduardoestrella avatar Mar 17 '15 08:03 eduardoestrella

Hi,

Thank you so much. :)

ljcleyba avatar Jul 22 '15 03:07 ljcleyba