Home Forums WinForms controls Xceed Grid for WinForms Reset the Datagrid(the DataSource)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #12903 |

    An attempt was made to set the value of a cell that is not yet associated with a grid. – is the Error Code

    following the DataBinding Example, I followed the same type of pattern in my databinding of the grid. The error occurs on gridControl1.DataSource = null;

    I’m using the DataView as the DataSource, when the LeavingEdit fires I’m updating my DataSource and bring back the updated view to rebind to the gridcontrol. So, I’m using the pattern from the example(DataBinding). Inside the ResetGrid method, the call to set gridControl1.DataSource = null; gives the error explained above.

    Imported from legacy forums. Posted by Diddy (had 2841 views)

    User (Old forums)
    Member
    Post count: 23064

    I’m getting the same error when i add a new row and updates the database with the changes and then updates the grid again with the saved datatable.

    xceedGrid.DataSource = table
    ‘ERROR: An attempt was made to set the value of a cell that is not yet associated with a grid.

    Xceedsoft Support – please respond !

    Imported from legacy forums. Posted by BenjaminT (had 301 views)

    User (Old forums)
    Member
    Post count: 23064

    there is a bug in the 2.0 version of the grid. To do many of the things you see in the example they provide, you have to do them during the applicationidle event. Things like, rebinding, resetting events that pertain to the grid, resetting editors for the grid columns, etc. Just add the code you have above to that the method that handles the application idle event.

    Imported from legacy forums. Posted by Diddy (had 3804 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.