Current filter:
                                You should refresh the page.
                                  • Hi,

                                    Why a internal call is done to the gridview datasource (BindingList<T>) EndNew method when I call the gridview. SetMasterRowExpanded method ?

                                    The master datasource is not updated only the gridview control is updated throw the detail view added by the SetMasterRowExpanded call.

                                    The EndNew seems to be called by CurrencyDataController.CurrencyManager.EndCurrentEdit.

                                    Is it an expected behavior ?

                                    My version is 18.1.4.18187
                                • Sasha (DevExpress Support) 12.06.2018

                                  Hello Laurent,

                                  I reproduced this behavior. It occurs because internally, the SetMasterRowExpanded method calls the UpdateCurrentRow method and as a result, the EndCurrentEdit method is called. However, it's not clear what issue is caused by this behavior. Would you please describe the issue and your scenario in greater detail?

                                  I look forward to your response.

                                • Laurent C 12.06.2018
                                  Hello Sasha,

                                  The issue is that the ItemIndex parameter is not equals to -1 but > 0 .
                                  In my case, 3 rows in the master gridview. Each has a detail view. 
                                  When I expand the last row, the master datasource receives a EndNew(itemIndex = 2) .

                                  The correct behavior according to MSDN is :
                                  The EndNew method commits a pending new item that was added through thAddNew method. If there is no new item waiting to be committed, then this method does nothing. The index of the new item to be added.


                                  In a expand/collapse scenario, no item was added into the master datasource. Expanding the second row forward a EndNew with an itemIndex equals to -1.
                                  But expand the last row forward a EndNew with itemIndex equals to 2.

                                  The expand/collapse behavior should be the same for all the gridview's rows with the master datasource.

                                  My issue is that I have my own datasource object inherits BindingList<T> and I overrides the EndNew method wich call others methods because the itemindex is not equals to -1. The same issue occurs when you leave the row with the CheckCanLeaveRow internal call which ends to the UpdateCurrentRow internal method.

                                  Best regards 
                                • Dmitry Tor (DevExpress Support) 12.07.2018

                                  Hi,
                                  Thank you for the clarification. I understand your difficulties. However, before suggesting any solution, it is important for us to understand how your custom datasource works. Would you please provide us with a simple working project that illustrates your custom datasource's internal logic? It will allow us to find a precise solution for you much faster. I look forward to your reply.

                                • Laurent C 12.13.2018
                                  Hi Dmitry,

                                  If you call the "ResetBindings" method in the "EndNew" method, you will find that the detail grids disappear.
                                  On a legitimate "EndNew", an internal sort is done. For the grid to take into account this sort, a "ResetBinding" is performed. It's this "ResetBinding" that seems to disappear the detail grids (a phenomenon that I do not understand either).

                                  Beyond what my code does in the "EndNew" method :
                                  1) Is it correct that an "EndNew" is provoking when no element has been added in the BindingList ?
                                  2) Is it correct that the "ResetBindings" on the main "DataSource" makes the already opened and loaded detail grids disappear ? 
                                • Pavel (DevExpress Support) 12.14.2018

                                  Hi Laurent,

                                  In fact, the EndNew method is called by the CurrencyManager.EndCurrentEdit method, but not from our code. As for your second question, when you call the ResetBindings method, your BindingList sends the ListChangedType.Reset message to the grid. This message is sent when most of the list has been changed, so all listening controls should refresh all their data. And that is why GridControl collapses all its expanded master rows and hides opened detail views.
                                  I'm afraid that it is still unclear why you have to use a custom data source type in your application. Could you please elaborate on this point? A sample project demonstrating your scenario would be appreciated, as it will help us find a solution.

                                0 Solutions

                                Creation Date Importance Sort by