on 01-06-2015 4:04 AM
hi,
i've a table implemented with images (small image icons) as one of the columns. that images column has a formatter which displays different images depending on the value that comes from oData service.
now the requirement is at reach row level: table has a action (link or buttom) which does some processing and comes back with the update row. and here the value of the image change is changed, i'm unable to figure it out on how to change the image when its values is change?
for ex:
for val=1 show image=Male Icon
for val=2 show image=Female Icon
for val=3 show image=Group Icon etc...
for val=0 show image=None
Hello Box,
I have modified your example a bit and now when you change the value in the input the icon changes. The problem was that you are checking for a strict number (with ===) but what comes from the input is a string. It should be no different if you have a button which when clicked performs some logic and updates the values in the model.
Here is the modified example - JS Bin - Collaborative JavaScript Debugging
Best,
Deyan
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 Dennis,
that part is already completed, what i'm looking for is this. where if i change the value from 1 to 2 in last column, it has to show 2's image.
i think this way its possible! will have to put it in actual code and check. plz validate if any otherway to handle this.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.