function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tdeptdep 

Adding RowClasses to Datatable shows hidden rows

Just tinkering around with some dataTables and when I add rowclasses it is messing up the output of the table.

 

.row1 {height:20px;}
.row2 {height:20px;}

.row1:hover {background-color:#EBDDE2;}
.row2:hover {background-color:#EBDDE2;}

There are 2 as one will change.

 

<apex:dataTable rowClasses="row1,row2" value="{!needs}" var="n" rendered="{!selectedunitid != null}">
<apex:column headerClass="needsthwide" headervalue="Dimensions">
<apex:outputField styleClass="needst" value="{!n.Dimensions__c}" rendered="{!n.Category__c == 'Reception and Waiting Area'}" />
</apex:column>
<apex:column headerClass="needsth" headervalue="Qty">
<apex:inputField styleClass="needstinput" value="{!n.Quantity__c}" rendered="{!n.Category__c == 'Reception and Waiting Area'}" />
</apex:column>
<apex:column headerClass="needsth" headervalue="Square Feet">
<apex:inputField styleClass="needstinput" value="{!n.SF__c}" rendered="{!n.Category__c == 'Reception and Waiting Area'}" />
</apex:column>
</apex:dataTable>

Without the rowClasses parameter the table works fine. When I add the parameter on it shows all rows from the query... But where the rendered eval does not = true it will just hide the data, but show the row.

 

Example: (When rowClasses is present) 5 records in {!needs} and 1 is Category__c = 'Reception and waiting Area'. It will show 4 blank rows and 1 row with data.

 

Thanks in advance