cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering and sorting not working

Former Member
0 Kudos

Hi friends,

I am storing some values in table.For that i am using some input fields to enter the values to the table. if i select a row in that table its values should be passed to the input fields for editing or deleting .For this i wrote an action for the table (on table select action) which is working. But filtering and sorting is not working for that table though coding and binding the values to the columns are done properly.so could any help me.

regards,

M.Arunkumar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Arun,

For sorting table columns when you click the table column header, you can follow the code suggestion Submit M. gave above. If you need more information look at the tutorials also in the Help section of NWDS sp12+ if you search on TableSorter you will see the proceedure detailed. We have personally used this built in TableSorter.java class at my corp. many times and it does work. Also after sorting your leadSelection will remain the same so if unsorted and you select the 1st row after sorting if this row is on the next page due to sort you may not see it unless you page down through your tables. If this still does not help please provide more information what exactly is not working on your sort.

Former Member
0 Kudos

Hi Arun,

Are u getting the sorting icon in ur table headers.If not then there may be problem in ur code,where u have specified table columns for sorting.

public static void wdDoModifyView(IPrivateCheckSortView wdThis, IPrivateCheckSortView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

if (firstTime) {

IWDTable table = (IWDTable) view.getElement("Table");

wdContext.currentContextElement().setSorter(

new TableSorter(

table,

wdThis.wdGetSortCustomersAction(),

null,

new String[] { "<Column name>" }));

}

//@@end

}

If u r getting sorting icon,then check whether the onSort method is getting called or not.

regards

Sumit

former_member186016
Active Contributor
0 Kudos

Hi,

For sorting refer to following thread :

Regards

Ashwani Kr Sharma

Former Member
0 Kudos

Hi,

for filtering and sorting tables properly please refer to:

<a href="http://www.i-barile.it/SDN/Tables.zip">Tables</a>

Reward points for helpful answers.

Best regards,

Gianluca Barile