I have an mySQL query which fetch product information from database. According to the count of rows, visual c# code generates array of form controls :
The generated controls are as follows, depending on Count of rows(i) :
_arrProductLabel[i] //(Product name, fetching from SQL)
_arrPriceLabel[i] //(Price data, fetching from SQL)
_arrSoldTextBox[i] //(*Empty,user input area - user inputs the quantity of each sold item)
_arrResultBox[i] //(Desired to be calculated ,on keydown of each _arrSoldTextBox[i] )
I want to have each _arrSoldTextBox[i] to write the result to trigger _arrResultBox[i] on keydown.
The formula will be : to multiply the price (_arrPriceLabel[i] and sold amount _arrSoldTextBox[i] and give the value into _arrResultBox[i])
How can i do it ? Where can i declare the method for an array of controls ?
"Select * from products"
The generated controls are as follows, depending on Count of rows(i) :
_arrProductLabel[i] //(Product name, fetching from SQL)
_arrPriceLabel[i] //(Price data, fetching from SQL)
_arrSoldTextBox[i] //(*Empty,user input area - user inputs the quantity of each sold item)
_arrResultBox[i] //(Desired to be calculated ,on keydown of each _arrSoldTextBox[i] )
I want to have each _arrSoldTextBox[i] to write the result to trigger _arrResultBox[i] on keydown.
The formula will be : to multiply the price (_arrPriceLabel[i] and sold amount _arrSoldTextBox[i] and give the value into _arrResultBox[i])
How can i do it ? Where can i declare the method for an array of controls ?