copy column layout (sort+active/inactive columns) from one grid to other

BatchPatch Forums Home Forums BatchPatch Support Forum copy column layout (sort+active/inactive columns) from one grid to other

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12900
    jazzworm
    Participant

    Hi,

    I’m wondering if it’s possible to copy the column layout from one grid to another grid.
    Sometimes I change the column layout in a grid and afterwards I want to have the same view in all of my other grids too. Unfortunately changing the position of columns in a grid with many target hosts using the “Customize columns …” feature usually freezes BP for few seconds per click, which sums up in a long time of waiting if you want to move a column on a position where you need to skip many other columns.

    Thanks a lot for any hint

    #12924
    doug
    Moderator

    You have a few options here. Please read through all of these before trying anything. This way you can see which option makes most sense for your needs.

    1. You can modify the default column ordering for new tabs/grids by going to ‘Tools > Settings > Grid Preferences > Modify column display order for new tabs: column order for new tabs’ This won’t change the order of columns in existing grids, but I wanted you to be aware of this setting in case you want to make changes to the default ordering for new tabs at any time.

    2. I don’t know why it would be taking seconds for each click when using ‘Customize columns’ but I’m guessing it probably has to do with the amount of data that you have in the grid. I could believe that when there is a large amount of visible data in the grid, changing the order could be a bit slow. I suspect that if you hide the columns by unticking the boxes, then move them while they are all hidden, then tick the boxes again to make them visible, it might solve this issue.

    3. Another way to move columns in a grid is by using left-click ALT drag/drop. So you would left-click on the column header, hold down the ALT key, then drag the header to the desired position and drop it there. The only issue with this method is if you have a lot of hidden columns, it could place the visible column that you dragged/dropped in between two hidden columns. This isn’t a problem but might just be not exactly what you want in the end. You could get around this by first making all columns visible, then close the ‘Customize columns’ window, then drag/drop column headers to re-order, then re-open ‘Customize columns’ and hide the desired columns.

    4. This is probably the quickest option. Save and close the grids. Then make a backup copy of the .bps files just for safekeeping in case you break the originals. Then open the .bps files in a text editor such as Notepad++ or Sublime Text. Near the top of the file you will see:

    <SettingName>ColumnDisplayIndex</SettingName>
    <SettingValue>There will be a string of numbers in this field</SettingValue>

    If you copy the entire SettingValue section for the ColumnDisplayIndex, you should be able to put that into the .bps file for another grid. Then save and close, and then open that .bps in BatchPatch, and it should take on the same column ordering as the source grid where you copied it from. Just be careful when you do this. If you don’t copy the field exactly as-is and replace it properly… you will probably break the grid. Leaving an extra space or linebreak, or deleting a single character, or modifying it in any way will likely prevent the grid from being able to open without error. Or if it opens without error, it could still throw an error later. So just be very careful when doing this and you should be fine.

    #12925
    jazzworm
    Participant

    Hi doug,

    many thanks for the fast and very detailed answer.
    Option 3. does it absolutely for the moment. Sometimes it’s so simple :-). I just was not aware that I need to press alt in addition.
    Option 4. I will check out at a later time.

    Many thanks again

    #12926
    doug
    Moderator

    No problem. Turns out actually that you don’t need to press ALT. I was confusing it with something else. You can simply drag and drop column headers to re-order them.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.