Current filter:
                                You should refresh the page.
                                We apologize for the inconvenience. Our ordering system and the support center may be offline for a few hours on Sunday, May 19 due to maintenance tasks.
                                0
                                  • Hi.
                                    Found a bug when moving the AgDatagrid between different Panels (compact/full view modes).

                                    I would also appreciate some kind of temporary workaround for this, when moved I would like to keep the grouped columns and have the same grouped rows expanded as before.

                                    Best regards
                                    /Ralf

                                    Stack Trace:
                                    --------------------------------------------------------------------------------------------------
                                    Value does not fall within the expected range.

                                    at System.Windows.Size..ctor(Double width, Double height)
                                    at DevExpress.AgDataGrid.AgDataGridRow.OnHandleUpdate()
                                    at DevExpress.AgDataGrid.Internal.RowsController.ApplyRowValue(AgDataGridRowBase row, Int32 handle)
                                    at DevExpress.AgDataGrid.Internal.RowsController.GetRow(Int32 handle)
                                    at DevExpress.AgDataGrid.Internal.RowsController.PerformVisibleElementsLayout(Int32 count)
                                    at DevExpress.AgDataGrid.Internal.RowsController.PerformLayout()
                                    at DevExpress.AgDataGrid.AgDataGrid.PerformRowsLayout()
                                    at DevExpress.AgDataGrid.AgDataGrid.PerformLayout()
                                    at DevExpress.AgDataGrid.AgDataGrid.OnLoaded()
                                    at DevExpress.AgDataGrid.AgDataGrid.<.ctor>b__38(Object d, RoutedEventArgs e)
                                    at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
                                    at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

                                    Steps to Reproduce:

                                    * Start the attached project.

                                    * Expand one of the grouped rows.

                                    * Click the button to move the grid to the other Panel/Grid.

                                CustomDataGrid.zip
                                0

                                Hi Ralf,

                                Thank you for the report, and for providing the sample project.

                                I've reproduced the problem locally, and we'll examine why it occurs.

                                As an immediate solution, please surround the code that changes the grid's parent with the BeginUpdate/EndUpdate pair:

                                	
                                [C#]
                                aggrid.BeginUpdate(); if (grd1.Children.Count == 0) { grd2.Children.Clear(); grd1.Children.Add(aggrid); } else if (grd2.Children.Count == 0) { grd1.Children.Clear(); grd2.Children.Add(aggrid); } aggrid.EndUpdate();

                                This should "fix" the problem.

                                Thanks,
                                Vito

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.