-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have been using three grid components in all of my screens. I want only the center grid to have some specific style settings such like disabling striping and grid lines. How can I set the style of that without disturbing the other two grids?
If I use the <style> tag or CSS, all the grid component look have been changing.
Do I need to create a custom component by extending the grid and then only I can able to do what I was intended to? Is there any other alternatives?
Thanks.
I have been using 'sclass="custom_grid"' according to the grid.
I think I want to move my style details inside a separate CSS file and I can refer in all my screens. Then I can specify the style using sclass for each grid.
Any suggestions?
Thanks.
I have created a custom component as follows:
[Added in lang-addon.xml file]:
<component>
<extends>grid</extends>
<component-name>tpfieldgrid</component-name>
<property>
<property-name>fixedLayout</property-name>
<property-value>true</property-value>
<property-name>oddRowSclass</property-name>
<property-value>none</property-value>
<!--
<property-name>sclass</property-name>
<property-value>"fieldgrid"</property-value>
-->
</property>
</component>
[custom component used as follows]:
<tpfieldgrid>
<columns visible="false">
<column label="" width="24%" />
<column label="" width="30%" />
<column label="" width="4%" />
<column label="" width="1%" />
<column label="" width="13%" />
<column label="" width="30%" />
</columns>
<rows>
<row>
<label value="Location Transfer No"
width="80%" />
<textbox value="" width="80%" />
<image src="" width="80%" />
<label value="" width="80%" />
<label value="From Location" width="80%" />
<combobox width="80%">
<comboitem label="" />
<comboitem label="" />
</combobox>
</row>
<row>
<textbox />
<label value="" width="80%" />
<label value="" width="80%" />
<label value="" width="80%" />
<label value="To Location" width="80%" />
<combobox width="80%">
<comboitem label="" />
<comboitem label="" />
</combobox>
</row>
<row>
</row>
</rows>
</tpfieldgrid>
The problem here is, the custom component exists. But, the associated property settings are not considered.
Am I doing anything wrong?
Thanks.
Have you tried ZK Studio's Style Designer ever befor?
You can use it to customize your Grid's look & feel follow the ZK Studio's User Guide.
And you can trace the code ZK Studio generated for you to learn how to customize your Grid component.
Asked: 2009-08-07 07:35:38 +0800
Seen: 204 times
Last updated: Aug 09 '09