I have an ASP.NET DataGrid where each row object allows access to its data through the following mechanism: public object this[string fieldName] { get; }
. This means that in the XML I need to do something similar and can't just use a PropertyName. This class is third party, so I can't make a Property for it. Is there any syntax to make this work?
<asp:DataGrid ID="test" runat="server" PageSize="25" AllowPaging="True" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn HeaderText="Test" DataField="this['iswhatiwanttodo']">
</asp:BoundColumn>
</Columns>
</asp:DataGrid>