You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by bjolletz <da...@pagero.com> on 2008/10/28 14:37:48 UTC

Change row appearance in a DataGrid

Hi!

I've just started learning Wicket and like it very much so far. I've found
the very nice DataGrid component, for which I have a question:

Is it possible to alter the appearance of a row in the grid in some custom
way? What I want to do is that depending on my row data, I want all text in
certain rows to be printed with bold text-weight. In other words, I want to
add a class attribute to some of the rows, for which I can provide a style
sheet.

Is this possible in some way?

Thanks in advance!

/Daniel
-- 
View this message in context: http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207345.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Change row appearance in a DataGrid

Posted by bjolletz <da...@pagero.com>.
Thanks for the very quick reply!

I may be stupid but DataGrid doesn't seem to have a newRowItem() method to
override. I did some googling and found that you can do just this for
DataGridView, but I'm using DataGrid, which does not extend from
AbstractGridView (which has the newRowItem method), but from AbstractGrid.

Am I missing something obvious here?

/Daniel


jwcarman wrote:
> 
> Override newRowItem() and decorate it however you want (using
> AttributeAppender behavior perhaps).
> 
> On Tue, Oct 28, 2008 at 9:37 AM, bjolletz <da...@pagero.com>
> wrote:
>>
>> Hi!
>>
>> I've just started learning Wicket and like it very much so far. I've
>> found
>> the very nice DataGrid component, for which I have a question:
>>
>> Is it possible to alter the appearance of a row in the grid in some
>> custom
>> way? What I want to do is that depending on my row data, I want all text
>> in
>> certain rows to be printed with bold text-weight. In other words, I want
>> to
>> add a class attribute to some of the rows, for which I can provide a
>> style
>> sheet.
>>
>> Is this possible in some way?
>>
>> Thanks in advance!
>>
>> /Daniel
>> --
>> View this message in context:
>> http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207345.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207809.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Change row appearance in a DataGrid

Posted by James Carman <ja...@carmanconsulting.com>.
Override newRowItem() and decorate it however you want (using
AttributeAppender behavior perhaps).

On Tue, Oct 28, 2008 at 9:37 AM, bjolletz <da...@pagero.com> wrote:
>
> Hi!
>
> I've just started learning Wicket and like it very much so far. I've found
> the very nice DataGrid component, for which I have a question:
>
> Is it possible to alter the appearance of a row in the grid in some custom
> way? What I want to do is that depending on my row data, I want all text in
> certain rows to be printed with bold text-weight. In other words, I want to
> add a class attribute to some of the rows, for which I can provide a style
> sheet.
>
> Is this possible in some way?
>
> Thanks in advance!
>
> /Daniel
> --
> View this message in context: http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207345.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org