J
Joe Rattz
I can't seem to bind an array of custom classes to my DataGrid. I get the following error
"A field or property with the name 'dcAbbreviation' was not found on the selected datasource:
This seems like it should be simple as falling off a log, but I can't find it. I also can't seem to find any useful code or article on the web either. Here are my specifics
Here's my class I have an array of
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:types:WEJOEI:genpt.com")
public class messageData_t
/// <remarks/
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)
public string dcAbbreviation
/// <remarks/
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)
public string messageNumber
/// <remarks/
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)
public string messageText
You may recognize it as a generated web service proxy class...so don't ask me to change it please
Here's my DataGrid Columns section
<ASP:BOUNDCOLUMN HeaderText="DC" DataField="dcAbbreviation" SortExpression="dcAbbreviation"></ASP:BOUNDCOLUMN><ASP:BOUNDCOLUMN HeaderText="Message Number" DataField="messageNumber" SortExpression="messageNumber"></ASP:BOUNDCOLUMN><ASP:BOUNDCOLUMN HeaderText="Message" DataField="messageText" SortExpression="messageText"></ASP:BOUNDCOLUMN
And, here's the code I am trying to bind with
ParentGrid.DataSource = retData.messageDataCollection
ParentGrid.DataBind()
Can anyone tell me what I am doing wrong
Thanks.
"A field or property with the name 'dcAbbreviation' was not found on the selected datasource:
This seems like it should be simple as falling off a log, but I can't find it. I also can't seem to find any useful code or article on the web either. Here are my specifics
Here's my class I have an array of
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:types:WEJOEI:genpt.com")
public class messageData_t
/// <remarks/
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)
public string dcAbbreviation
/// <remarks/
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)
public string messageNumber
/// <remarks/
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)
public string messageText
You may recognize it as a generated web service proxy class...so don't ask me to change it please
Here's my DataGrid Columns section
<ASP:BOUNDCOLUMN HeaderText="DC" DataField="dcAbbreviation" SortExpression="dcAbbreviation"></ASP:BOUNDCOLUMN><ASP:BOUNDCOLUMN HeaderText="Message Number" DataField="messageNumber" SortExpression="messageNumber"></ASP:BOUNDCOLUMN><ASP:BOUNDCOLUMN HeaderText="Message" DataField="messageText" SortExpression="messageText"></ASP:BOUNDCOLUMN
And, here's the code I am trying to bind with
ParentGrid.DataSource = retData.messageDataCollection
ParentGrid.DataBind()
Can anyone tell me what I am doing wrong
Thanks.