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
390
Bug with 8.2
posted

I just converted over from 8.1 to 8.2 and the WinGrid is giving me a new error. For some reason the grid is calling the InitializeTemplateAddRow when the form closes. It wasn't doing that before (or at least not causing an exception). InitializeTemplateAddRow is called after the data source has been disposed and I get a key not found error. I added the isFormClosing test to fix it but I shouldn't have to do this. What's going on?

private void ultraGrid1_InitializeTemplateAddRow(object sender, InitializeTemplateAddRowEventArgs e)
{
            if(this.isFormClosing)
                return;
            
            e.TemplateAddRow.Cells["CreatedOn"].Value = DateTime.Now;

            ...

}

 

Parents
No Data
Reply
  • 37774
    posted

    I couldn't reproduce this, but there are a number of variables, such as how you're showing the form, whether the datasource is sited on the form itself (i.e. in the form's components collection), etc.  Regardless, an exception shouldn't be thrown.  You should submit this issue to Developer Support and provide a small sample replicating the issue.

    -Matt

Children
No Data