Hello all,
I'm reading a tutorial about updating an sql table
using ado.net capabilities, in this example,
using a data grid to get input values and update the
needed row in the table, now, the problem is that
i don't really understand what is the content
of the "UpdateView()" function, i've tried several things but don't really achieve the thing updateView() need’s to do (just updating the view, after the :
"grid.EditItemIndex = e.Item.ItemIndex;")
if anyone can helps..
Best,
P.
public void EditCommand(Object sender,
DataGridCommandEventArgs e)
{
// Set the current item to edit mode
grid.EditItemIndex = e.Item.ItemIndex;
// Refresh the grid
UpdateView();
}
public void UpdateCommand(Object sender,
DataGridCommandEventArgs e)
{
// TODO: Retrieve new text and update the data source
// Reset the edit mode for the current item
grid.EditItemIndex = -1;
// Refresh the grid
UpdateView();
}
public void CancelCommand(Object sender,
DataGridCommandEventArgs e)
{
// Reset the edit mode for the current item
grid.EditItemIndex = -1;
// Refresh the grid
UpdateView();
}
I'm reading a tutorial about updating an sql table
using ado.net capabilities, in this example,
using a data grid to get input values and update the
needed row in the table, now, the problem is that
i don't really understand what is the content
of the "UpdateView()" function, i've tried several things but don't really achieve the thing updateView() need’s to do (just updating the view, after the :
"grid.EditItemIndex = e.Item.ItemIndex;")
if anyone can helps..
Best,
P.
public void EditCommand(Object sender,
DataGridCommandEventArgs e)
{
// Set the current item to edit mode
grid.EditItemIndex = e.Item.ItemIndex;
// Refresh the grid
UpdateView();
}
public void UpdateCommand(Object sender,
DataGridCommandEventArgs e)
{
// TODO: Retrieve new text and update the data source
// Reset the edit mode for the current item
grid.EditItemIndex = -1;
// Refresh the grid
UpdateView();
}
public void CancelCommand(Object sender,
DataGridCommandEventArgs e)
{
// Reset the edit mode for the current item
grid.EditItemIndex = -1;
// Refresh the grid
UpdateView();
}