J
Jiho Han
I have a dataset with multiple tables in it. If I want to utilize
DataViewManager to bind to the datagrid, how would I do that?
I guess I am looking for the correct binding expression.
For example, if I have an xml such as below:
<associations>
<association>
<associationid>123</associationid>
<fromid>a1</fromid>
<fromobjecttypecode>1</fromobjecttypecode>
<toid>b1</toid>
<toobjecttypecode>2</toobjecttypecode>
</association>
<account>
<accountid>a1</accountid>
<name>Infinity Info</name>
</account>
<contact>
<contactid>b1</contactid>
<fullname>Jiho Han</fullname>
</contact>
</associations>
Then I read it into the dataset and set default sort:
XmlTextReader xtr = new XmlTextReader(dataXml, XmlNodeType.Element, null);
dsAssociations.ReadXml(xtr);
viewManager = new DataViewManager(dsAssociations);
foreach (DataViewSetting dvs in viewManager.DataViewSettings)
dvs.ApplyDefaultSort = true;
Now when I come to bind it, what is the correct expression to get the
"fullname" of the contact given accountid a1? I assume I need to apply a
rowfilter somewhere first though.
Thanks.
DataViewManager to bind to the datagrid, how would I do that?
I guess I am looking for the correct binding expression.
For example, if I have an xml such as below:
<associations>
<association>
<associationid>123</associationid>
<fromid>a1</fromid>
<fromobjecttypecode>1</fromobjecttypecode>
<toid>b1</toid>
<toobjecttypecode>2</toobjecttypecode>
</association>
<account>
<accountid>a1</accountid>
<name>Infinity Info</name>
</account>
<contact>
<contactid>b1</contactid>
<fullname>Jiho Han</fullname>
</contact>
</associations>
Then I read it into the dataset and set default sort:
XmlTextReader xtr = new XmlTextReader(dataXml, XmlNodeType.Element, null);
dsAssociations.ReadXml(xtr);
viewManager = new DataViewManager(dsAssociations);
foreach (DataViewSetting dvs in viewManager.DataViewSettings)
dvs.ApplyDefaultSort = true;
Now when I come to bind it, what is the correct expression to get the
"fullname" of the contact given accountid a1? I assume I need to apply a
rowfilter somewhere first though.
Thanks.