简体   繁体   English

DataValueField 中有两个值?

[英]two values in DataValueField?

how can i add two value into datavaluefield of a dropdownlist (orderid, vendorid).如何将两个值添加到下拉列表(orderid、vendorid)的 datavaluefield 中。 when selected a vendor information will be displayed with the vendorid then gridview will grab the orderid and list all order details.选择供应商信息后,将显示供应商 ID,然后 gridview 将获取订单 ID 并列出所有订单详细信息。 what other ways can i do this?我还有什么其他方法可以做到这一点?

One way you might consider is storing just the OrderId field in the DataValueField.您可能考虑的一种方法是仅将 OrderId 字段存储在 DataValueField 中。 Then when this changes, you can look up the Order for the OrderId and find the VendorId and use this to find the Vendor and populate the vendor information.然后,当此更改时,您可以查找 OrderId 的 Order 并找到 VendorId 并使用它来查找 Vendor 并填充供应商信息。 This will work if the Order has the Vendor Id associated with it.如果订单具有与其关联的供应商 ID,这将起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM