This question is locked. New answers and comments are not allowed.
Hi,
To edit a row that the user double-click the first cell and enter the desired value, I want to set a different value to the second cell. However, there is a problem in the code below. the second cell value is old value when the user press the TAB key and focus the second cell. The second cell is new value when the user again press the TAB key, But it is working properly use third cell.
Thanks.
| private void grdMaliyetHesapla_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e) |
| { |
| if (e.Cell.Column.UniqueName == "cPozNo") |
| { |
| client.PozGetirCompleted += client_PozGetirCompleted; |
| client.PozGetirAsync(e.Cell.Value.ToString()); |
| } |
| } |
| void client_PozGetirCompleted(object sender, MaliyetHesapla_S2.MaliyetHesaplaProxy.PozGetirCompletedEventArgs e) |
| { |
| if (e.Result == null || e.Result.Count==0) |
| { |
| RadWindow.Alert(new DialogParameters() { Header = "Uyar", Content = "Poz bulunamad!", OkButtonContent = "Tamam" }); |
| return; |
| } |
| GridViewRow currentRow = grdMaliyetHesapla.ItemsControl.ItemsGenerator.ContainerFromItem(grdMaliyetHesapla.CurrentRecord) as GridViewRow; |
| foreach (var detail in e.Result) |
| { |
| GridViewCell cell = currentRow.Items[3] as GridViewCell; |
| if (cell != null) |
| { |
| cell.Content = detail.cAciklama; |
| cell.Value = detail.cAciklama; |
| } |
| } |
| } |