This question is locked. New answers and comments are not allowed.
I've run into some display issues using the hideColumn and reorderColumn client calls.
Issue 1.
Trying to reorder columns in a random order does not work. Causes columns to disappear.
If I work from the last column forward, always placing the the column at the front this works.
Is this the expected use of reorderColumn?
Issue 2:
Trying to reorder columns again after hiding some columns also has issues.
Step 1. Reorder Columns (Using working around from Issue 1)
Step 2: Hide 2 Columns
Step 3a: Trying to reorder the remaining visible columns (using workaround from issue 1) causes columns to disappear
Step 3b. If I account for hidden columns though and reorder them explicitly to the end of the grid this works.
I found that if i don't perform the initial reorder (step 1) then Step 3a will work.
Attached is an example project that shows these examples.
Issue 1.
Trying to reorder columns in a random order does not work. Causes columns to disappear.
grid.reorderColumn(3, grid.columnFromMember(
"Address"
));
grid.reorderColumn(4, grid.columnFromMember(
"City"
));
grid.reorderColumn(2, grid.columnFromMember(
"Zip"
));
grid.reorderColumn(0, grid.columnFromMember(
"State"
));
grid.reorderColumn(1, grid.columnFromMember(
"Name"
));
If I work from the last column forward, always placing the the column at the front this works.
grid.reorderColumn(0, grid.columnFromMember(
"City"
));
grid.reorderColumn(0, grid.columnFromMember(
"Address"
));
grid.reorderColumn(0, grid.columnFromMember(
"Zip"
));
grid.reorderColumn(0, grid.columnFromMember(
"Name"
));
grid.reorderColumn(0, grid.columnFromMember(
"State"
));
Is this the expected use of reorderColumn?
Issue 2:
Trying to reorder columns again after hiding some columns also has issues.
Step 1. Reorder Columns (Using working around from Issue 1)
grid.reorderColumn(0, grid.columnFromMember(
"City"
));
grid.reorderColumn(0, grid.columnFromMember(
"Address"
));
grid.reorderColumn(0, grid.columnFromMember(
"Zip"
));
grid.reorderColumn(0, grid.columnFromMember(
"Name"
));
grid.reorderColumn(0, grid.columnFromMember(
"State"
));
Step 2: Hide 2 Columns
grid.hideColumn(
"Zip"
);
grid.hideColumn(
"Address"
);
Step 3a: Trying to reorder the remaining visible columns (using workaround from issue 1) causes columns to disappear
grid.reorderColumn(0, grid.columnFromMember(
"State"
));
grid.reorderColumn(0, grid.columnFromMember(
"Name"
));
grid.reorderColumn(0, grid.columnFromMember(
"City"
));
Step 3b. If I account for hidden columns though and reorder them explicitly to the end of the grid this works.
grid.reorderColumn(0, grid.columnFromMember(
"Zip"
));
grid.reorderColumn(0, grid.columnFromMember(
"Address"
));
grid.reorderColumn(0, grid.columnFromMember(
"State"
));
grid.reorderColumn(0, grid.columnFromMember(
"Name"
));
grid.reorderColumn(0, grid.columnFromMember(
"City"
));
I found that if i don't perform the initial reorder (step 1) then Step 3a will work.
Attached is an example project that shows these examples.