Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have wpf application. my question is i how to assign decimal value which is store in decimal datatype variable into datagridtextcolumn?
Posted
Comments
Mark Salsbery 25-Jun-11 5:03am    
If there's a decimal property in the row data objects, then you can bind the same as always, like <wpftk:DataGridTextColumn Header="Decimal" Binding="{Binding Path=SomeDecimalProperty}" />

What did you try that didn't work the way you intended?

1 solution

you can use this instead
<datagrid.columns>
    <datagridtemplatecolumn>
        <datagridtemplatecolumn.celltemplate>
            <datatemplate>
                <textblock text="{Binding YourDecimalPropertyHere}" />
            </datatemplate>
        </datagridtemplatecolumn.celltemplate>
    </datagridtemplatecolumn>
</datagrid.columns>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900