Can anyone shed some light on this for me?
I could really use an example of this, as the API doesnt really give me much help on what the "Properties" or their format are for creating some columns. Also is this the right thing to be using when binding to columns that will not exist until a query join will return data? It seems to be, but i have not been able to get it to work.
A better way to clarify this is in pseudo code.. (my join is massive and will just look complex here)
Code:
1 BusinessObjects.tblMyTableCollection Collection1 = new BusinessObjects.tblMyTableCollection();
2 BusinessObjects.tblMyTable2Collection Collection2 = new BusinessObjects.tblMyTable2Collection();
3 BusinessObjects.tblMyTableQuery Query1 = new BusinessObjects.tblMyTableQuery();
5 BusinessObjects.tblMyTable2Query Query2 = new BusinessObjects.tblMyTable2Query();
6
7 Query1.Select(Query1.Field1, Query2.Field2, Query1.Field3);
8 Query1.InnerJoin(Query2).On(Query1.FK == Query2.PK);
9 Query1.Where(Query1.Field1 == "abcdef");
10 Query1.OrderBy(Query1.Field1.Ascending);
11
12 Collection1.load(Query1);
13
14 myList.BindingContext = new BindingContext();
15 myList.DataSource = Collection1;
16 myList.Refresh();
If the above code is run, and 0 rows are returned, the joined column "Field2" does not exist in the collection. If I run the query again and return a row.. the "Field2" still doesnt appear to be in the collection and the field in the list is blank.
HOWEVER... if I exit the form altogether and then come back in and the 1st time the query is run it returns a row, everything works fine.
I just want a way to add the columns so that when I return 0 rows, THEN i return a row all the data will show up
Cheers,
Mark