Rank: Member
Joined: 5/28/2004(UTC) Posts: 330
|
These seems basic enough to be asked here.. but may not be. What if I want to display on the dashboard orders sorted by vendor or at least have the order show what vendor the item(s) in the order are set to. I understand this could get hairy if you just add the ability to display the vendor inline how it is, but if it were sorted out by vendor then an order that contains items from multiple vendors could show up in multiple places (which is fine since one would need to order from the various vendors). It seems like a line or two of code would accomplish this pretty easily but I just don't know. I'm not sure if there is an equivalent for displaying information such as Code: <asp:LinkButton ID="EmailField" runat="server" Text='<%# Bind("UserEmail") %>' Is there a list somewhere of the variations that could be used here?
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
In order to do this you would have to write code in the code behind on the control that displays the orders. Since Vendors are attached to products and not orders there is no way to use the syntax that you pasted above because you could have many vendors on a single order. You would have to pull all of the vendors in a way similar to this...
Dim vendors As New Collection(Of Contacts.Vendor)() For Each lineItem As Orders.LineItem In currentOrder.Items if Not String.IsNullOrEmpty(lineItem.AssociatedProduct.VendorId) then Dim vendor As Contacts.Vendor = Contacts.Vendor.FindByBvin(lineItem.AssociatedProduct.VendorId) if vendor IsNot Nothing then vendors.Add(vendor) EndIf EndIf End For
This would give you a list of vendors that you could then databind to a list and display in that grid. It would take a bit of customization, but wouldn't be too terribly hard. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/28/2004(UTC) Posts: 330
|
I was guessing the multiple vendors per order would be the main issue. Sorry for duplicate posting.. I just figured after doing it here that the customization section probably made more sense. Thanks for the assistance Justin.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.