3.2.0

Dynamic style of cell

Hi,
Can we give different style for different cells in the table ? If yes then how ?
Ishita
March 25,
The simplest way is just assign the style attributes directly -

grid.getCellTemplate(col, row).setStyle("color", "red");

For a dynamic style example look here -

http://www.activewidgets.com/javascript.forum.19446.1/setting-a-cell-to-a.html
Alex (ActiveWidgets)
March 25,
HI Alex,
Thanx for the quick response. It worked.
Can we directly use the styles present in the stylesheet by setting className to the cell-template property and including that stylesheet in the html page ?
If yes then how ?
Regards,
Ishita
March 25,
Yes, instead of setStyle() use setClass() method -

http://www.activewidgets.com/aw.system.html/setclass.html

You can also use #id selector, for example

#myGrid-cell-1-2
#myGrid-row-1 (AW.UI.Grid)
#myGrid-row-1-left (AW.Grid.Extended)

etc.
Alex (ActiveWidgets)
March 26,
<div id="content" runat="server" style="height:1300px">
<iframe src="http://nareb.com/wordpress/" name="dynFrame" id="dynFrame" style="width:523px;" runat="server"
frameborder="0" scrolling="no" height="100%"></iframe>

</div>

Instead of height=1300px i want my div(content) to dynamically adjust according to iframe height . Any help will be heartily appreciated.

Thanx in advance.
sushil
August 5,

This topic is archived.

See also:


Back to support forum