Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1802

Grid group labels disappear when hide first column

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.5.2
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      windows 7, firefox 20 and IE10

      Description

      The group labels on a grid with grouping disappear when the first column is hidden.

      Try the following code in the sandbox. Clicking the checkbox in the header of the 2nd column causes the first column to disappear, along with all the group labels.

      <zk>
      	<zscript>
      	import org.zkoss.zksandbox.*;
      	Comparator asc = new RowLabelComparator(true),
      		dsc = new RowLabelComparator(false);
      	</zscript>
      	<grid>
      		<columns sizable="true">
      			<column label="hide me" hflex="min"/>
      			<column label="hide 1st col" hflex="min" style="color:red"><checkbox  onClick="self.getParent().getPreviousSibling().setVisible(!self.getParent().getPreviousSibling().isVisible())" /></column>
      			<column label="Brand" sortAscending="&#36;{asc}" sortDescending="&#36;{dsc}" hflex="2"/>
      			<column label="Processor Type" hflex="1"/>
      			<column label="Memory (RAM)" hflex="1"/>
      			<column label="Price"  hflex="1"/>
      			<column label="Hard Drive Capacity" hflex="1"/>
      		</columns>
      		<rows>
      			<group label="Dell"/>
      			<row>
      				<label value="hidden" />
      				<label value="visible" />
      				<label style="padding-left:15px" value="Dell E4500 2.2GHz"/>
      				<label value="Intel Core 2 Duo"/>
      				<label value="2GB RAM"/>
      				<label value="$261.00" style="color:green"/>
      				<label value="500GB"/>
      			</row>
      			<row>
      				<label value="hidden" />
      				<label value="visible" />
      				<label style="padding-left:15px" value="XP-Pro Slim Dell-Inspiron-530-s"/>
      				<label value="Intel Core 2 Duo"/>
      				<label value="2GB RAM"/>
      				<label value="$498.93" style="color:green"/>
      				<label value="500GB"/>				
      			</row>
      			<row>
      				<label value="hidden" />
      				<label value="visible" />
      				<label style="padding-left:15px" value="Dell P4 3.2 GHz"/>
      				<label value="Intel Pentium 4"/>
      				<label value="4GB RAM"/>
      				<label value="$377.99" style="color:green"/>
      				<label value="500GB"/>				
      			</row>
      			<group label="Compaq"/>
      			<row>
      				<label value="hidden" />
      				<label value="visible" />
      				<label style="padding-left:15px" value="Compaq SR5113WM"/>
      				<label value="Intel Core Duo"/>
      				<label value="1GB RAM"/>
      				<label value="$279.00" style="color:green"/>
      				<label value="160GB"/>				
      			</row>
      			<row>
      				<label value="hidden" />
      				<label value="visible" />
      				<label style="padding-left:15px" value="Compaq HP XW4200"/>
      				<label value="Intel Pentium 4"/>
      				<label value="4GB RAM"/>
      				<label value="$980" style="color:green"/>
      				<label value="500GB"/>				
      			</row>
      		</rows>
      	</grid>
      </zk>
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Jackster Jackster
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: