setting enumerations in combobox Cell Element seams to crash the grid

2 posts, 0 answers
  1. Erion
    Erion avatar
    11 posts
    Member since:
    Feb 2011

    Posted 08 Sep 2011 Link to this post

    Hi I am using the Gridview, to display some data. I have a tax filing status column, which I am giving it the values of the combo box from an enumeration, like the following. 

    (gridViewTemplateTaxData.Columns["FilingStatus"] as GridViewComboBoxColumn).DataSource = Enum.GetNames(typeof(TaxFilingStatus));

    When I the user changes the value in the combo box, I change the bound data of the grid. Then I refresh the templates of the grid. 
    Some of the time this works fine, but often enough, I get the following exception. 

    Object reference not set to an instance of an object. 

    Telerik.WinControls.UI.GridComboBoxCellElement.SetContent().  I walked through the code that I have in the cell value changed, and there is no issues there. Am I using the ComboBoxColumn wrong ? 

    - Erion
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 09 Sep 2011 Link to this post


    if you are changing the data source in the cell value changed event this could lead to some strange results.

    Could you please post some snippets, or a new very small project where this occurs, to make it easier to find a working solution.

    Best Regards,
    Emanuel Varga,

    WinForms MVP
Back to Top