on 09-27-2008 1:14 AM
Im unable to sort the table data
Procedure What i followed
1.i Created attribute called Sorter of java native Type package.TableSorter
2.i'm add following code in modifyview
//@@begin wdDoModifyView
if (firstTime) {
IWDTable table = (IWDTable) view.getElement("Table");
wdContext.currentContextElement().setTableSorter(new TableSorter(table, wdThis.wdGetSortAction(), null));
3.And also method onActionSort
onActionSort()
//@@begin onActionSort(ServerEvent)
wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.nodeProducts());
//@@end
4. program code for the sort class under sac u2192 packages -packagename.TableSorter
5.in table properties Events-
onsort -Sort
but still i'm not able to sort the table data .....
after deploying i can able to see Up arrow and Down Arrow in table Header ........for sorting
when i'm selecting any arrows for sorting i'm not able to sort and also Arrow marks disappears for particular column when i selected
Ramprasad,
I think you havenot mentioned the columns to be sorted
check this thread
write this code in wddomodifyview
if (firstTime) {
if (null != view) {
IWDTable table = (IWDTable) view.getElement("Table");
//IWDTable table1 = (IWDTable) view.getElement("Table1");
wdContext.currentContextElement().setTableSorter(
new TableSorter(
table,
wdThis.wdGetSortAction(),
null,
new String[] {
"Column",
"Column1",
"Column2",
"Column3",
"Column4",
"Column5",
"Column6" }));
}
column1,column2 are the table clumns
Associate an action onsort of the table and write this code in the onsortaction
wdContext.currentContextElement().getTableSorter().sort(
wdEvent,
wdContext.nodeFilter_Salary());
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi!
replace your code by
if(firstTime)
{
view.nowCreateAllCustomExtensionFields();
IWDTable tab= (IWDTable)view.getElement("Table");
wdContext.currentContextElement().setCustomerTableSorter(new TableSorter(tab,wdThis.wdGetTableSortAction(),new HashTable() ,new String[] {"Customers") ));
}
do organize imports
thanks
vishal
check this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.