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?
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?