View Single Post
Staro 11.03.2010., 16:02   #3
high5
Registered User
 
Datum registracije: Aug 2009
Lokacija: N/A
Postovi: 46
Nisam bas neki napredni korisnik, ne znam jesam li te bas dobro skuzio i dobro odradio. Evo koda pa ako mozes pogledat gdje grijesim;

private void button2_Click(object sender, EventArgs e)
{

string upit = "SELECT * FROM Proizvod";
SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS; AttachDbFilename = D:\\Documents and Settings\\\My Documents\\Visual Studio 2008\\Projects\\proba\\baza.mdf; Integrated Security=True; Connect Timeout=30; User Instance=True");
SqlCommand cmd = new SqlCommand(upit, conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);


DataSet dt = new DataSet();
da.Fill(dt);

dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index);
BindingSource bd = new BindingSource();
bd.DataSource = dt;
bd.EndEdit();
da.Update(dt);
high5 je offline   Reply With Quote