Select to view content in your preferred language

Binding Attributes

476
0
10-13-2011 11:43 AM
BrianGustafson
Occasional Contributor
How do I bind the Key-Value pairs to columns in a datagrid?  I have a featureset and when I bind that to a datagrid without columns I get the data as expected.  However I want the grid to read vertically in two columns one with the column headers and the other with the values.  Is there away to access the values in a featureset similar to Silverlight "<TextBlock Text="{Binding Path=Key}"?

This is my datagrid:

<s:DataGrid id="dg" width="100%" height="100%" color="#161717" >
   <s:columns>
    <s:ArrayList>
     <s:GridColumn headerText="Column Name" dataField="name"/>
     <s:GridColumn headerText="Value" dataField="value"/>
    </s:ArrayList>
   </s:columns>
  </s:DataGrid>
Tags (2)
0 Kudos
0 Replies