Binding Multiple Values to Single Component

Friends,

I am hoping someone can tell me if it's possible to bind multiple values to a single component and/or property. What I am attempting to do is display two values from a dataset in the Text property of a form. The form has a data navigator and the Text property should change with each record.

Any info would be greatly appreciated. Thanks!



Answer this question

Binding Multiple Values to Single Component

  • Peter Cox New Way automation

    Well, if I am going to add a new column to my datatable, I could also do this from the SQL side of things. Any opinions on what might be more efficient I expect to have up to 1000 records in this table.
  • Lyndon J Clarke

    I just went ahead and concatenated the columns in my dataset select statement, seems to work just fine. Thanks for the info!

    J.H.


  • dflat

    You could bind to one source at a time. You cannot bind textbox to multiple columns at same time and need to merge your columns in this case

  • Taby

    adding new column to dataset will be more efficient. The reason is because SELECT column1 + column2 FROM TABLE1 is actually creating 3 columns. it increase network traffic and workload for database engine.

    Even though create a new column may as well need more computation on CPU and memory, but this action is perform in client side if you are developing a win-based application.



  • MarkV

    You could create additional DataColumn in your DataTable and assign Expression to this column that will concatenate your values from two other columns. Then bind it. But it does not mean that when you change value in a TextBox, it will be split between two columns and assigned back to them

  • Binding Multiple Values to Single Component