To all I have complete the visualforce code to be provide the pagination for the account records in the table as my requirement but I am try to provide the sorting function on that table.
so I want the extension controller to provide the sorting function with the ascending and descending functionality(because I am new in the extension controller)for my visual page. So keep it in mind my pagination function is also worked together in the sorting function.
My Page is followingly,
<apex:page standardController="Account" recordSetVar="accountvar">
<apex:sectionHeader title="My Accounts" subtitle="Account List View"/>
<apex:form >
<apex:pageBlock >
<apex:pageMessages id="error" />
<apex:panelGrid columns="7" id="buttons" >
<!---<apex:pageBlockButtons>---->
<apex:commandButton reRender="error,blocktable,buttons" action="{!Save}" value="Save"/>
<apex:commandButton reRender="error,blocktable,buttons" action="{!Cancel}" value="Cancel"/>
<apex:inputHidden />
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasprevious}" action="{!First}" value="First"/>
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasprevious}" action="{!Previous}" value="Previous"/>
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasnext}" action="{!Next}" value="Next"/>
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasnext}" action="{!Last}" value="Last"/>
<!---</apex:pageBlockButtons>--->
</apex:panelGrid>
<apex:pageBlockSection id="blocktable" >
<apex:pageBlockTable value="{!accountvar}" var="t">
<apex:column headerValue="AccountName" value="{!t.Name}"/ >
<apex:column headerValue="BillingState/Province" value="{!t.BillingState}"/>
<apex:column headerValue="Phone" value="{!t.Phone}"/>
<apex:column headerValue="Type" value="{!t.Type}"/>
<apex:column headerValue="Account Owner Alias" value="{!t.Owner.Name}"/>
<apex:column headerValue="Website" value="{!t.Website}"/>
<apex:inlineEditSupport event="onClick"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
For answer's thanks in advance.
Your question belongs to the Salesforce StackExchange, you will have more answers here https://salesforce.stackexchange.com/
Please delete this one and create it on the Salesforce SE :)