Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Follow-up question on foreign descriptions in a datagrid
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00722386
Message ID:
00724054
Views:
24
Just out of curiosity.. Can't you do the join inside the SQL query, and return the parent description in the same table?

Regards,
Jose.

>Hi, all...
>
>I had an issue last week with updating a table that was defined as a child table in a relation...specifically, if one of the columns in a child table is defined as an expression column, and the user tries to modify the key field in the child table that's involved in the relation.
>
>The entire problem came about because I needed to be able to display descriptions from parent tables in a datagrid.
>
>Cathi sent me a reference on MSDN to the fact that this was an acknowledged bug in .NET. She also sent me a workaround site reference, where someone on MSDN published code on how to display descriptions from a related parent table [basically, a JOINTEXTBOXCOLUMN class that uses GetParentRow].
>
>That worked fine as well and solved my problem...however, after working with it for a week, I came across one drawback. Any columns in the datagrid that use this JOINTEXTBOXCOLUMN class to show descriptions from a parent table can't be sorted...in other words, if one of my columns is an account name column where the account name comes from another table and I use this class....clicking on the column heading to sort the column has no effect [since the value is coming from a table other than the one to which the datagrid is bound].
>
>Is there a workaround for this? Sadly, if there isn't, I probably won't have any choice but to add new columns descriptions to the datatable on the fly [after I get the raw result sets back from SQL Server], and populate them on the fly from the parent table. Certainly not elegant, and I'd love to avoid it if I can.
>
>Any ideas?
>
>Thanks,
>Kevin
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform