This is a migrated thread and some comments may be shown as answers.

Using grid-wide converters

1 Answer 7 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 10 Mar 2011, 03:26 PM
Hi there.

I'm using a grid wide converter on a RadGridView control (rather than a converted for each column). In this grid I have records which have several fields, the most important of which are UserImage, UserImageWidth and UserImageHeight.

In this converter, I want to tell the UserImage field to build its entries using the information from the UserImageWidth and UserImageHeight fields.

How can I do this?

1 Answer, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 11 Mar 2011, 12:01 PM
Hello Antony,

 In order to have access to all the fields in your data object in your ValueConverter in a specific column, you need to omit the Path from the column's DataMemberBinding. This way instead of just the value of the field specified in Path, the Convert method of your ValueConverter will get the whole data item.

Greetings,
Yavor Georgiev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Steve
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Share this question
or