Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a data table and would like to bind a text box to a particular row from that data table. The data table has three columns; Name, Value & CoilNumber. The binding row will change when a different coilnumber is selected. One of the rows in this table from the "Name" column is 'CGLg'. How can I bind a text box to the 'Value' column where the name column = 'CGLg' and 'CoilNumber' = 1? It seems like simple concept but isn't turning out that way.
Posted
Comments
Oleksandr Kulchytskyi 26-Dec-12 15:44pm    
Which UI farmework did you use ??
WPF or WinForms???

1 solution

Seems like I had to ask the stupid question before stumbling upon the answer. Here it is for anyone else who might be looking for the same solution.

C#
cgGapInputNumericBox.DataBindings.Add("Value",DataTable("Name = 'CGGap' And CoilNumber = '" + _val.ToString() + "'") , "Value");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900