Thursday, February 09, 2012 3:44 AM
Has anyone worked out the difference between DomainDataSource's Data and DataView Properties? They appear to produce the same results when I use each? Are there any times when I should use one or the other?
Thursday, February 16, 2012 1:41 AM
You are right, the value of DomainDataSource.Data and DomainDataSource.DataView are same.
But the difference is that the type of DomainDataSource.Data is returned as IEnumerable while DataView is DomainDataSourceView.
If you try to get access the properties of DomainDataSourceView, it will be more convience to use DomainDataSource.DataView.
But you can also cast DomainDataSource.Data to DomainDataSourceView and then access its properties.
private void dds_LoadedData(object sender, LoadedDataEventArgs e)
int n = dds.DataView.Count;
int i = (dds.Data as DomainDataSourceView).Count;
All in all, there are not much differences between these two only the defined type is different.
Thursday, February 16, 2012 3:40 AM
Thankyou, that's a very helpful explination.