You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mscoon <ms...@gmail.com> on 2014/06/04 12:20:19 UTC
Dynamically changing column visibility on DataTable during ajax refresh
Hi all,
Is there a way to change the visibility of one or more columns of a
DataTable during an ajax refresh?
The only way I've found so far is to create a new list of columns and
replace the DataTable but this is a bit cumbersome compared to simply
writing ajaxRequestTarget.add(dataTable);
Marios
Re: Dynamically changing column visibility on DataTable during ajax refresh
Posted by mscoon <ms...@gmail.com>.
Thanks Sven.
I was looking into implementing a isColumnVisible(int columnIndex) method,
and your suggestion makes this quite easy.
On Wed, Jun 4, 2014 at 1:53 PM, Sven Meier <sv...@meiers.net> wrote:
> Hi,
>
> you can alter the list of columns you have passed to the DataTable
> constructor:
>
> new DataTable(id, columns, ...);
>
> onConfigure() {
> columns.clear();
> columns.addAll(...);
> }
>
> onClick() {
> target.add(dataTable);
> }
>
> Regards
> Sven
>
>
>
> On 06/04/2014 12:20 PM, mscoon wrote:
>
>> Hi all,
>>
>> Is there a way to change the visibility of one or more columns of a
>> DataTable during an ajax refresh?
>>
>> The only way I've found so far is to create a new list of columns and
>> replace the DataTable but this is a bit cumbersome compared to simply
>> writing ajaxRequestTarget.add(dataTable);
>>
>> Marios
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Dynamically changing column visibility on DataTable during ajax
refresh
Posted by Sven Meier <sv...@meiers.net>.
Hi,
you can alter the list of columns you have passed to the DataTable
constructor:
new DataTable(id, columns, ...);
onConfigure() {
columns.clear();
columns.addAll(...);
}
onClick() {
target.add(dataTable);
}
Regards
Sven
On 06/04/2014 12:20 PM, mscoon wrote:
> Hi all,
>
> Is there a way to change the visibility of one or more columns of a
> DataTable during an ajax refresh?
>
> The only way I've found so far is to create a new list of columns and
> replace the DataTable but this is a bit cumbersome compared to simply
> writing ajaxRequestTarget.add(dataTable);
>
> Marios
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org