Click here to Skip to main content
12,949,601 members (67,120 online)
Rate this:
Please Sign up or sign in to vote.
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 26-Dec-12 9:38am
Oleksandr Kulchytskyi 26-Dec-12 15:44pm
Which UI farmework did you use ??
WPF or WinForms???

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,489
CHill60 3,380
Maciej Los 2,913
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web02 | 2.8.170524.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100