Hi
I'm having trouble getting the right data in my radgrid. I am working with an asp.net webapplication with C# and a WCF webservice. This webservice returns me a list of values which I have to put in class so I can show them in my radgrid. The problem is that the radgrid gets the wrong attributes. Can somebody take a look at this code and tell me what I'm doing wrong? Here's my code:
codebehind (c#):
foreach (string key in keys) { |
if (lijst.TryGetValue(key, out value)) { |
properties.Add(new VO_ObjectPropertyHelper(key,value[0],value[1])); |
} |
} |
rgProperties.DataSource = properties; |
rgProperties.MasterTableView.DataSource = properties; |
VO_ObjectHelper class:
public partial class VO_ObjectPropertyHelper { |
public string propID { get; set; } |
public string name { get; set; } |
public string value { get; set; } |
public VO_ObjectPropertyHelper(string _propID, string _name, string _value) { |
this.propID = _propID; |
this.name = _name; |
this.value = _value; |
} |
} |
webpage:
<telerik:RadGrid ID="rgProperties" runat="server" AutoGenerateColumns="False" GridLines="None" AllowSorting="True" ShowHeader="false" Skin="Vista"> |
<mastertableview> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="name" HeaderText="Meter Eigenschappen" SortExpression="name" UniqueName="name" > |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="value" HeaderText="" SortExpression="value" UniqueName="value"> |
</telerik:GridBoundColumn> |
</Columns> |
</mastertableview> |
</telerik:RadGrid> |