Forum Moderators: open
I am three different tables which I'm joining thru different datarelations (all in one dataset).
Now, what I want is to sort a table (any one) based on columns in other tables. E.g. if table1 has a particular column sorted, then I want something like table2.sort=<column from table1>.
Do I have to create a 4th table? If yes, then how?
Also, can I do this without creating a 4th table?
Thanks in advance.
Am I missing the point?
Ross
The column in table1 has got absolutely no relation with that of table2 or table3. In fact, all the tables are linked by a single id field (you can assume this id to be pk in any one table, and fk in rest of the tables).
sorting affects the way this id field is rearranged and I want the same rearrangement in rest of the tables.
hkpanda
When you sort a table in .Net, you do it using a dataview. What dataview does is creates an in-memory representation of sorted recordset; no actual sorting is applied on table. In fact you can see unsorted and sorted rows both at the sametime using the same dataview (by using rowstatefilter property).
The limitatiom is dataview can be sorted based on columns of the base table (of which the dataview is created) and not on any other tables (even if joined via relations).
Still feel like digging into it?