You need to sign in to do that
Don't have an account?
lalitarora
Datatable not showing filters after getting rerendered
Datatable not showing filters after getting rerendered, when i click button to rerender data table it loses it style and show compact data.
<apex:commandButton value="Rerender table" action="{!abc}" rerender="tblWRsa" rendered="true"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1" id="pbs1">
<apex:outputPanel id="panel_1">
<apex:dataTable value="{!abc}" var="wrsa" id="tblWRsa" >
......
....
</apex:dataTable>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlock>
Before
After
<apex:commandButton value="Rerender table" action="{!abc}" rerender="tblWRsa" rendered="true"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1" id="pbs1">
<apex:outputPanel id="panel_1">
<apex:dataTable value="{!abc}" var="wrsa" id="tblWRsa" >
......
....
</apex:dataTable>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlock>
Before
After
<apex:commandButton value="Rerender table" action="{!abc}" rerender="tblWRsa" rendered="true" oncomplete = "showTable();"/>
function showTable()
{
// call the jquery/javacript method which structures the table. You might have used it on load.
}
All Answers
<apex:commandButton value="Rerender table" action="{!abc}" rerender="tblWRsa" rendered="true" oncomplete = "showTable();"/>
function showTable()
{
// call the jquery/javacript method which structures the table. You might have used it on load.
}
<!--<apex:page standardController="STG_Subscription_Asset_Item__c" extensions="VBSubscriptionAssetSelectorController">-->
<apex:page controller="Controllerabc" tabStyle="Account">
<apex:includescript value="//code.jquery.com/jquery-1.12.3.min.js" / >
<apex:includescript value="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js" />
<apex:stylesheet value="//cdn.datatables.net/1.10.12/css/jquery.dataTables.css" />
.....
included new function
<script type="text/javascript">
function loadTableStyle()
{
<apex:includescript value="//code.jquery.com/jquery-1.12.3.min.js" / >
<apex:includescript value="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js" />
<apex:stylesheet value="//cdn.datatables.net/1.10.12/css/jquery.dataTables.css" />
}
</script>
<apex:commandButton value="rerendertable" action="{!function}" rerender="tblWRsa" styleClass="display" rendered="true" oncomplete="loadTableStyle();"/>
this is the datatable..
<apex:dataTable value="{!list}" var="wrsa" id="tblWRsa" styleClass="display">
Its still not working with above changes. What wrong am doing here?
Can u please post original code ( whole page code) once....I will find out what to be done
http://salesforce.stackexchange.com/questions/82313/jquery-not-initialised-after-rerender