I
Iain
Hi All
I have a datagrid which takes it's data from a table on
a remote i-series. This datagrid is loaded on Page Load
and the user is able to select a record to edit by pressing
the appropriate button. No problem so far.
The problem comes in that I appear to have to reload the
data into the datagrid before placing it into editstate.
string LSqlString;
LSqlString = "Select * From ICOSF.LIVLEADTIM";
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = LSqlString;
OleDbDataReader dsLivery = cmd.ExecuteReader();
Livery.DataSource = dsLivery;
Livery.EditItemIndex = e.Item.ItemIndex;
Livery.DataBind ( );
con.Close();
This is fine and works. However the problem comes into play in the
following scenario
1. The page loads and reads the table and populates the datagrid.
2. Someone else deleted a record from the source table via some
other process. This record is still visible in the loaded datagrid.
3. My user selects that particular record for editing.
4. The data load is fired off again and the datagrid is placed into
edit mode
this time with the wrong record highlighted for editing - down to
the
selected ItemIndex of the record selected of the original
datagrid.
Anyone have any ides about how I oversome this problem.
Thanks in advance for any help offered
Iain
I have a datagrid which takes it's data from a table on
a remote i-series. This datagrid is loaded on Page Load
and the user is able to select a record to edit by pressing
the appropriate button. No problem so far.
The problem comes in that I appear to have to reload the
data into the datagrid before placing it into editstate.
string LSqlString;
LSqlString = "Select * From ICOSF.LIVLEADTIM";
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = LSqlString;
OleDbDataReader dsLivery = cmd.ExecuteReader();
Livery.DataSource = dsLivery;
Livery.EditItemIndex = e.Item.ItemIndex;
Livery.DataBind ( );
con.Close();
This is fine and works. However the problem comes into play in the
following scenario
1. The page loads and reads the table and populates the datagrid.
2. Someone else deleted a record from the source table via some
other process. This record is still visible in the loaded datagrid.
3. My user selects that particular record for editing.
4. The data load is fired off again and the datagrid is placed into
edit mode
this time with the wrong record highlighted for editing - down to
the
selected ItemIndex of the record selected of the original
datagrid.
Anyone have any ides about how I oversome this problem.
Thanks in advance for any help offered
Iain