Hi
In my application I m using tablecombo with 2 columns. I have added sorter
to both the columns. This works fine when no combo item is selected.
Clicking the column header in combo sorts the list and the combo remains
open after sorting is done.
But if a item is selected in the combo, clicking the combo header sorts the
list but the combo is closed and combo text is set to the selected item.
What I need is the the combo remains expanded after sorting.
I have added a selection listner to the colums in table combo for sorting
and another selection listner to TableComboViewer.
Is there a way to do so ?
Please do let me know
// sorting direction is descending as its already sorted in
// ascending order.
if (currentColumn == combo.getTable().getColumn(
colNumber)) {
dir = SWT.DOWN;
} else {
dir = SWT.UP;
}
}
combo.getTable().setSortDirection(dir);
comboViewer.setSorter(new TableSorter(
colNumber, dir));
}
}
"TableSorter" is a class that extends ViewerSorter class and has sorting
logic.
Thanks & Regards
Neha.
"Marty Jones" <martybjones@gmail.com> wrote in message
news:i0sjk8$lgo$1@build.eclipse.org...
> Neha,
>
> Do you have a snippet that shows the issue that you are seeing? If so,
> attach it and I will look into the issue.
>
> Thanks,
>
> Marty
Tom is correct. It is always helpful to have a full snippet showing the issue that you are seeing. That way I will see exactly what you are seeing instead of me coding a full snippet and may not be able to reproduce the bug.
// sorting direction is descending as its already sorted in
// ascending order.
if (currentColumn == combo.getTable().getColumn(
colNumber)) {
dir = SWT.DOWN;
} else {
dir = SWT.UP;
}
}
combo.getTable().setSortDirection(dir);
comboViewer.setSorter(new TableSorter(
colNumber, dir));
}
}
"TableSorter" is a class that extends ViewerSorter class and has sorting
logic.
Thanks & Regards
Neha.
"Marty Jones" <martybjones@gmail.com> wrote in message
news:i0sjk8$lgo$1@build.eclipse.org...
> Neha,
>
> Do you have a snippet that shows the issue that you are seeing? If so,
> attach it and I will look into the issue.
>
> Thanks,
>
> Marty
Tom is correct. It is always helpful to have a full snippet showing the issue that you are seeing. That way I will see exactly what you are seeing instead of me coding a full snippet and may not be able to reproduce the bug.