update one row

G

Guest

I have a grid that is updateable but how can I update one row instead of all
rows in the grid? I'm using a datalayer and not a typed dataset.

code:
//populates the grid:

public void getData()
{
datagrid.datasource = GetAuto.GetSales();
datagrid.databind();
}

private void btnUpdate_Click(object sender, System.EventArgs e)
{
foreach(DataGrid item in datagrid.Items)
{
string strCarVin = ((TextBox)items.FindControl("txtCarVin")).Text;
string strSalesMan = ((TextBox)items.FindControl("txtSalesMan")).Text;
}
update.UpdateSales(strCarVin, strSalesMan);
}

so how can i update the grid but only the row(s) that been updated and not
all of them?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,069
Latest member
SimplyleanKetoReviews

Latest Threads

Top