Click here to Skip to main content
15,899,937 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have multiple rows of data that they want to send dataGridView and from dataGridView to sql server
in fact like basket ,but using ado.net
i have cod,name,price,count
i want by inter taransfer data ,texbox4,texbox5 show in the datagrid
like factor
please help me .
Posted
Updated 31-Mar-12 3:32am
v2
Comments
nagendrathecoder 31-Mar-12 6:32am    
Please explain a bit more.
nasim sol 31-Mar-12 8:40am    
i want by select combobox and inter
transfer data to datagrid
Such stores that the customer will select multiple items
in fact i have multiple item but i cant send to datagrid
El_Codero 31-Mar-12 7:00am    
And what have you tried so far?
nasim sol 31-Mar-12 8:42am    
i have code,name,price,count

private void comboBox2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
listBox1.Items.Add(l1+ ")"+comboBox2.Text + " " + textBox4.Text + " " + textBox5.Text);
}
this code transfer data to listbox but i want transfer to datagridviwe:
l1:mycode,combobox1:name,texbox4:count,texbox5:price
i have multiple item but i cant send to datagrid
nasim sol 31-Mar-12 9:00am    
only i get data from table but i cant send to datagrid

private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{


textBox5.Text = comboBox2.SelectedValue.ToString();
textBox5.Text = (int.Parse(textBox5.Text) * int.Parse(textBox4.Text)).ToString();

srch1(comboBox2.SelectedValue.ToString());
label10.Text = l1;
label11.Text = q1;
label12.Text = textBox5.Text;


}
void srch1(string Idddd)
{
foreach (information1 f1 in ist1)
{
if (f1.price_id == Idddd)
{
l1 = f1.price_id;
q1 = f1.price_type;
textBox5.Text = f1.price;
}


}
}

1 solution

 
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