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

[Solved] Binding GridViewDataColumn to an object

1 Answer 218 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Big_G
Top achievements
Rank 1
Big_G asked on 21 Sep 2010, 04:04 PM
I'm trying to bind a column in my Grid to a custom Float wrapper. The whole goal is to get the field to show null if the object is null and if it's not null, then show its value property via Float.GetFloat().

I'm getting these values from a WCF service.

SourceHoldings is a type SomeService.Float, and I want to display its property (via GetFloat()) as the value. How do I achieve this?

 

 

 

<tlk:GridViewDataColumn DataMemberBinding="{Binding SourceHoldings}" Width="80" DataFormatString="{}:n0}" TextAlignment="Right" UniqueName="SourceHoldings" >
<tlk:GridViewDataColumn.Header>
<TextBlock Text="Holdings (Broker)" TextWrapping="Wrap" />
</tlk:GridViewDataColumn.Header>
</tlk:GridViewDataColumn>

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 22 Sep 2010, 08:22 AM
Hi Big_G,

We have a very good introductory article that demonstrates how you can bind RadGridView to a data source and display the data.


Kind regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Big_G
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or