Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
Templating Xamgrid column
posted

Hi,

I have a xamgrid that's bind to an observablecollection. how do I create a conditional templatecolumn on a field so that when i get a certain value "x" i display it on the grid as "y"

 <ig:TextColumn Key="Tags" HeaderText="Tags"></ig:TextColumn>

So if the value of my tags is "x", I want to display it as "y" in the grid to the user.

 

thanks,

-Steven

  • 138253
    Offline posted

    Hello Steven,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.

  • 138253
    Offline posted

    Hello Steven,

     

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I created a TempalteColumn for the Property that I want to change and added two TextBlocks. One bound to the real Value and the other one with static text. And by using converters I set their visibility appropriately, so that if the value is “30” the static text is shown and if not the real value is shown. When you enter edit mode the real data is shown in both cases. This way the underlying data is not changed. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

    xamGridDisplayText.zip