You need to sign in to do that
Don't have an account?
Hari@Rockzs
Swapping Data in DataTable
Hi Friends,
How to swap data in datatable can u any body help me! to swap records we have to use checkbox to select records
thanku
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi Friends,
How to swap data in datatable can u any body help me! to swap records we have to use checkbox to select records
thanku
Can you explain a bit more about what swapping data means? E.g. does it change the presentation of the table, the content of the table or something else.
Scenario:
I have data table,in one column i have checkbox,and in another column i have Account Names,and i have one button on the top of table,i can select any two of Accountnames by checking checkboxes and cilck the button then the two records(places of that records in the data table) are swapped in the datatable itself.
Checkbox Name
[] A1
[] A2
[SWAP]
Presumably the checkbox does not form part of the account record? That being the case, you will need to use our old friend the wrapper class to combine the checkbox and the account record.
Then you'd back your datatable with a list of the wrapper classes, pulling the name and the checkbox from the wrapper class instance.
When the button is clicked, you can traverse your list of wrapper classes to determine which have the checkbox ticked. Once you've found that, swap the wrapper accounts, unset the checkboxes and redraw the table.
can u please give me suggestion to get selected records only displayed in another page in same scenario.
Hari@RockZ
You'll need to pass the record ids on the URL of the new page.
E.g. if you have built a list of accounts to display on the new page in your action method named 'theAccs', your action method needs to finish similar to the following:
and your target page needs to pull these from the URL.
ThanX BOB
Iam getting Error with this,
Can u explain more please..................
Hari@RockZ
Not unless you tell me what the error you are getting is I'm afraid.