Datagrid binding 2 datafiled under one column along with an image?

Posted by prince23 on Stack Overflow See other posts from Stack Overflow or by prince23
Published on 2010-05-12T06:09:58Z Indexed on 2010/05/12 6:14 UTC
Read the original article Hit count: 140

Filed under:

hi,

here i am performing nested grid operation where in my first datagrid . have name,age,address

once user clicks the row we will be showing another grid that is with data Subject name and Score

untill here the functionality works fine .

1:now the Question is that i should be displaying an image along with score in the same column( how can i achive this one)

2:Depending on the score i need to show an image( binding different image based on score)

1 :that is if score is 20 show ( ~images/image1.jpg)

2 :that is if score is 40 show ( ~images/image2.jpg)

3 :that is if score is 20 show (~images/ image3.jpg)

output [ in a grid  format]
 subject score  
 science  45 image3
 maths    50 image2
 Computer 60 image1
 general  78 image1

how do we solve this issue . any idea how to go ahead. please let me know. hope my question is clear

thanks in advance

prince

© Stack Overflow or respective owner

Related posts about silverlight-4.0