on 08-05-2017 6:04 PM
Hi All,
I am able to retrieve data from odata model and display in table successfully.
I am using sap.ui.table using xml view and also have selection mode as MultiToggle.
Due to this Multi Toggle, i am getting checkbox in the table for row selection. This table also
have cell editable for different columns and for different records.
I am using manifest and component files to develop this application.
Now my requirement is, the check box has to be selected automatically when the cell
value(input value) is changed to a different value. Again if the cell value is reverted back to
original value then the checkbox has to be deselected automatically.
I think we should write this logic under input->livechange event but how to compare old value and new value and how to update the checkbox.
Thanks
shashi
once user places the cursor in the field the event gets triggered. In the event parameter you can get the selected row and through that get the index of the entry in parent json. Compare the value after user leaves the cursor with the temporary model(just create another model and assign patent model to it). If same or different perform your desired activity.
Regards,
Sgarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shashi,
you could create 2 json models (original and delta) ... and based on the live change event which you know of... you could compare the new value of the property bound to the cell text against the original data model - if the value is not the same, then update the model property bound to the checkbox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergio,
Thanks for the input. Yes able to understand theoretically but would like to have some sort of coding to get this.
i just want to know how to get a particular record by passing the value without looping each record using for statement in javascript. if i want to validate for 1000th record then i have to loop 1000 times the original data model to validate with the delta model.
Thanks
Shashi
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.