Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Unable to update the first UltraWebGrid row
posted

Hello All.

I have an Ultrawebgrid and I update my rows with UpdateRowBatch.

I'm able to update all my rows except the first. Why ?

Updaterowbatch code :

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

void

UWG_UpdateRowBatch(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)

{

 

mytableTableAdapter

ta = new mytableTableAdapter();

 

 

mydatabaseDataSet ds = new mydatabaseDataSet();

ta.Fill(ds.mytable, num);

 

 

string dataKey = e.Row.Cells.FromKey("ID").ToString();

 

 

switch

(e.Row.DataChanged)

{

 

 

case (DataChanged.Modified):

 

 

if (dataKey != null)

{

 

 

DataRow dr = ds.mytable.Rows.Find(new object[] { dataKey });

 

 

try

{

 

 

if (null != dr)

 

 

foreach (UltraGridCell c in e.Row.Cells)

 

 

if (-1 != ds.mytable.Columns.IndexOf(c.Column.Key))

 

 

try

{

 

 

if (!dr[c.Column.Key].Equals(c.Value))

dr[c.Column.Key] = c.Value;

}

 

 

catch

{

}

}

 

 

catch (Exception ex)

{

}

e.Row.DataKey = e.Row.Cells.FromKey("

ID").Value;

}

ta.Update(ds);

 

 

break;

Have you ever encountered this situation ?

Best regards.