Anyone have this DataGrid issue?

Discussion in 'ASP.NET / ASP.NET Core' started by rdlecler, Apr 18, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Man, Microsoft really makes some horrible software....

    I am working with DataGrid in a Master-Details scenario, but I am having problems updating the DataGrid after I modify the object in the details pane save it to the server. After I save the modification, the service callback sends the saved object back to the client. Once there, I want swap in the modified object into the DataGrid. I am doing the following, but I get an exception from the third "if" statement:

    public void OnUpdateCompleted(
    object
    sender, OnUpdateCompletedEventArgs e)

    if (dataGrid.SelectedItem == null){
    throw new Exception();
    }
    Info info = e.Result as Info;
    if (info == null){
    throw new Exception();
    }
    dataGrid.SelectedItem = info;
    if (dataGrid.SelectedItem == null){
    throw new Exception();
    }
    ...
    }


    I don't understand this at all because I am clearly setting the data grid, the value I am supplying is not null, but when you set it with a value if says its null....Grrrr.....What's more if I do the same assignment prior to the callback I don't get the null..... Does anyone know what i am doing "wrong".... Having programed in Java for 10+ years I can honestly say C# is flakey....

     
  2. What is the exception error message?
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page