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

Changing DataMemberBinding for GridViewDataColumn

2 Answers 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Guy
Top achievements
Rank 1
Guy asked on 10 Mar 2011, 06:29 PM
Can somebody suggest a method that can permit us to change the DataMemberBing from with the client code (ie C#). Our problem is that the columns for a given grid display percentage values. When the user clicks op a radio button we want to display the associated dollar amount. We have tried using "CellTemplateSelector"  within xaml but for our purpase it is way too slow. So I have been told that we could change the data binding programmically and then rebind to another field within the dataset.
We are developing wilt Silver Light 4

Any help would be appreicated.

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 11 Mar 2011, 08:29 AM
Hello,

 Have you tried to set StringFormat for desired column DataMemberBinding? You can check this article for more info about StringFormat

Kind regards,
Vlad
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!
0
Guy
Top achievements
Rank 1
answered on 11 Mar 2011, 03:41 PM
I did not explain properly. I need to change the Binding inside the C# code. This is because dependong on the button clicked I want to bind to either a percent value or a dollar value.
Tags
GridView
Asked by
Guy
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Guy
Top achievements
Rank 1
Share this question
or