3
How can I generate this list in sequential pairs:
Array = Itens.text.Split(","[0]);
int qnt = Array .Length;
for (int i = 0; i < qnt; i++)
{
TextBox.Text = Array[i].text;
i++;
TextBox.Text = Array[i].text;
}
that way it doesn’t work, plus its removal the i++
That’s the way it goes:
TextBox.text = Array[0];
TextBox.text = Array[0];
TextBox.text = Array[1];
TextBox.text = Array[1];
TextBox.text = Array[2];
TextBox.text = Array[2];
wanted the way out to be:
TextBox.text = Array[0];
TextBox.text = Array[1];
TextBox.text = Array[2];
TextBox.text = Array[3];
TextBox.text = Array[4];
TextBox.text = Array[5];
and etc., to each loop
he rotate me like that.
if anyone can help me thank you!
What would these pairs be? I didn’t understand very well.
– Leonel Sanches da Silva
index in pairs, Ex
TxtProduto.text = ArrayProdutos[1] e TxtQnt.text = ArrayProdutos[2];
afterwardTxtProduto.text = ArrayProdutos[3] e TxtQnt.text = ArrayProdutos[4];
and so on– Hebert Lima
You have a
array
that the product name is in the odd index, and the quantity in the even index, and you want to fill text boxes with these values, but to do what exactly?– Leonel Sanches da Silva
to display the value of the respective index, you will generate a list of text boxes like this: Product Quantity, Product Quantity etc.
– Hebert Lima
This does not generate a list of
TextBox
. This makes theirTextBox
which already exist to be filled several times. You will create theseTextBox
Where? On screen? On report? Your solution is Web Forms?– Leonel Sanches da Silva
see if it’s clearer now =)
– Hebert Lima