This question is locked. New answers and comments are not allowed.
Hi i am trying to display contents of List<> data to a grid, but instead the grid is displaying empty rows.
following is the code. i can see the data in List , but Grid is not displaying anything.
Code for reference...
following is the code. i can see the data in List , but Grid is not displaying anything.
Code for reference...
public
class Assignees
{
public int responsible_key;
public string responsible_name;
public string department;
public string emailid;
}
public
void Load(string xml)
{
XDocument doc = XDocument.Parse(xml);
var data = from xelem in doc.Descendants("AssigneeDTO")
select new Assignees
{
department = xelem.Element(
"department").Value,
emailid = xelem.Element(
"emailid").Value,
responsible_key =
Convert.ToInt32(xelem.Element("responsible_key").Value),
responsible_name = xelem.Element(
XName.Get("responsible_name").Value
};
Assignee_Grid.ItemsSource = data;
}