on 01-29-2017 10:25 AM
Hi Experts,
I have a requirement. I have to show or hide the duplicate records for particular row based on the button click for that row. I used mergeDuplicates property but its showing initially and it is applying for all reocrds. But i want that based on button click and only for that record.
Hi Ashok ,
Actually merge duplicates will only allow to merge field values like kind of grouping(Batch field).
It could be done in many ways but i think of this solutions :
Before binding the list of items(object) to the table you can add a field 'visible' to each object in the array of data.Just for the first entry you can make visible true and for the duplicates one if present to false.
{"Batch":"1","BatchDesc":"batch1",visible:"true"},
{"Batch":"1","BatchDesc":"batch1",visible="false"},
and on the press of the button just get the pressed row Batch value and the whole table binding and change the visible property of each object in the table binding to true whose Batch value equal to batch value of the row pressed.
thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply.
I have a table with 3 columns(batch,batch description and add button). Let say I have 6 records.
arrar=[
{"Batch":"1","BatchDesc":"batch1"},
{"Batch":"1","BatchDesc":"batch1"},
{"Batch":"2","BatchDesc":"batch2"},
{"Batch":"3","BatchDesc":"batch3"},
{"Batch":"3","BatchDesc":"batch3"},
{"Batch":"4","BatchDesc":"batch3"}
]
When I set this data to my table, I have to show only 4 records(no duplicate). If I press the button for any row I have to show duplicate record for that particular batch.
Ex: If I press the button for batch one , my output screen has to show 5 records
{"Batch":"1","BatchDesc":"batch1"},
{"Batch":"1","BatchDesc":"batch1"},
{"Batch":"2","BatchDesc":"batch2"},
{"Batch":"3","BatchDesc":"batch3"},
{"Batch":"4","BatchDesc":"batch3"}
Thanks,
Ashok.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.