Help, I need help with highlighting rows in a Spark Data Grid


i new flex, please gentle.

 

is possible highlight rows in spark data grid without need mess around itemrenderers?

 

i trying create generic approach problem potentially impact grid within our system.

 

for example, have created indexedchangeabledatagrid extends spark data grid shown below:

 

<util:indexedchangeabledatagrid id="sitesofworkgrid"

                   x="443"

                   y="170"

                   width="240"

                   height="150"

                   dataprovider="{_otmworksitedetails.otmsitesofwork}"

                   editable="false"

                   gridclick.create="otmsitesofworkgrid_gridclickhandler(event)"

                   gridclick.edit="otmsitesofworkgrid_gridclickhandler(event)"

                   gridclick.controlled="otmsitesofworkgrid_gridclickhandler(event)"

                   sortablecolumns="false"

                   tooltip.create="click here create site of work"

                   tooltip.edit="click here create site of work"

                   tooltip.controlled="click here create site of work"

                   xpathprefix="/otmshift/otmworksitedetails[index0]/otmsitesofwork">

         <util:columns>

               <s:arraylist>

                   <s:gridcolumn datafield="name"

                                    headertext="site of work"

                                    editable="false">

                         <s:itemrenderer>

                             <fx:component>

                                   <s:griditemrenderer>

                                       <mx:linkbutton label="{data.label}"

                                                         click="outerdocument.sitesofworklistlinkbutton_clickhandler(event)"/>

                                   </s:griditemrenderer>

                             </fx:component>

                         </s:itemrenderer>

                   </s:gridcolumn>

 

 

                   <s:gridcolumn includein="controlled,create,edit,exit"

                                    width="20"

                                    editable="false">

                         <s:itemrenderer>

                             <fx:component>

                                   <s:griditemrenderer width="20">

                                       <s:image id="addimage"

                                                 source="@embed(source='/../resources/images/addicon16.gif')"

                                                 verticalcenter="0"

                                                 horizontalcenter="0"

                                                 tooltip="add site of work"/>

 

 

                                   </s:griditemrenderer>

                             </fx:component>

                         </s:itemrenderer>

                   </s:gridcolumn>

                   <s:gridcolumn includein="controlled,create,edit,exit"

                                    editable="false"

                                    width="20">

                         <s:itemrenderer>

                             <fx:component>

                                   <s:griditemrenderer width="20">

                                       <s:image id="image"

                                                 source="@embed(source='/../resources/images/deleteicon_enabled.gif')"

                                                 verticalcenter="0"

                                                 horizontalcenter="0"

                                                 tooltip="delete site of work"/>

                                   </s:griditemrenderer>

                             </fx:component>

                         </s:itemrenderer>

                   </s:gridcolumn>

               </s:arraylist>

         </util:columns>

         <util:typicalitem>

               <fx:object datafield1="{otm_site_of_work_label}"/>

         </util:typicalitem>

     </util:indexedchangeabledatagrid>

 

 

as can seen default state of grid has griditemrenderers on each column. want change background color "pink" in addition these griditemrenderers.

 

as far concerned, not interested in existing renderers, want them same appear above, in addition, pink background on rows.

 

this 1 grid in use, have 20-30 different grids different renderers , approach can realistically see have each of these renderers in file, , select appropriate renderer based on data in row. seems lot of hard work me. can not hold of row in grid , highlight it?



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support