English 中文(简体)
具有单一数据来源的多个文本箱的数据
原标题:Databinding to multiple textboxes with single data source

I m从事一个与一个简单的访问数据库互动的方案。 当表格装上时,需要多箱文字箱,这些箱子必须附在同一个表格上,并在数据库“库存——表”中填入现场。 显示库存数量的数量。 从那以后,订单将视必要纳入对清单进行调整的制度。

我需要具体说明它们各自应受约束的哪一行,因为现在,它约束了它们全部增长0,这是有意义的,而不是我想要的。 这是可能的吗? 这里,我必须约束目前。

   txtTopQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
   txtLegQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
    txtFastenerQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
    txtShortQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
    txtLongQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
    txtWheelQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
问题回答

勿庸置疑,从来不曾认为具有约束力的是预留。

如果这不是一个伙伴关系,我将这样做。 净应用是建立一个包含所有贵重物品的类别,并对此加以约束,或调整数据,以便按你想要约束的每栏一栏将数据退回。 因此,我认为你对你的数据拥有更大的控制权,这或许只是个人的偏好,但我总是这样做。

除此以外,你还可以有动态的文字箱子,例如,使用哪种控制符合你的需要,然后建立一个有标签和文字箱的项目模板。 您的对外控制项目定在数据集上,并将txt盒装到数量栏,然后将标签与你可以用来描述案文箱的内容联系起来。





相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签