[DevExpress Support Team: CLONED FROM A2161: How to preserve the XtraGrid View state]
Hmmm doesnt work on my end… the expanded row collapses when I refresh the grid…
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello,
Would you please send us a sample project that illustrates your scenario of using the grid and the RefreshHelpler class so that we can research the issue on our side?
I am looking forward to your response.
My project is too big I cannot just send a sample. However, I can describe it to you.
I have a master-detail grid that is being refreshed every x seconds. The problem (that I didn't experience with 13.1.8) is that the expanded row collapses after the refresh. The RefresherHelper class used to leave the grid view intact.
Here's my code when I update :
--------------------------
Dim GridState As New GridControlState(New GridControlState.ViewDescriptor() {New GridControlState.ViewDescriptor("", "ID"), New GridControlState.ViewDescriptor("wtSignals_wtSignals", "ID")})
GridState.SaveViewInfo(dgHistorique)
If gridHistorique.FocusedView.IsDraggingState Then
Return
End If
For Each form As Form In Application.OpenForms
Dim customizationForm As CustomizationForm = TryCast(form, CustomizationForm)
If customizationForm IsNot Nothing Then
If customizationForm.GridControl Is gridHistorique Then Return
End If
Next form
Me.ViewsDataSet.wtSignals.Merge(dtCloneSignaux)
GridState.LoadViewInfo(dgHistorique)
--------------------------
The RefresherHelper class is an exact copy of the one found in example E1466 (http://www.devexpress.com/Support/Center/Example/Details/E1466)
Hope this helps.
Hi Marc,
Most likely, expanded rows are collapsed after refresh due to the behavior described in the Master rows are collapsed when the ListChanged event is raised ticket. Would you please try setting the CollapseDetailRowsOnReset option to False just as the answer of that thread suggests and let us know if it solves the problem?
We're looking forward to your results.
It worked! Thanks a lot!