I am grouping by a column (void field) and when the grid initially loads the two groups are expanded (if there is data for each group) which is correct. But if there are are no records in one of the groups, when i do another filter (by date in my example) the grouping type that had no records in its group before now will not be expanded even if it has records.
On my 1st screenshot, for that date, there were no voids, so the 'Voided: Yes' grouping is hidden. So when I filter by another date, 2nd screenshot, there are records in the 'Voided: Yes' grouping but the group is collapsed.
I have the AutoExpandAllGroups set to true in the grid and also have ASPxGridView1.SettingsBehavior.AutoExpandAllGroups = "true" set on the grid load.
Is there more I need to do to keep these groupings always expanded?
aspx:
<dxwgv:ASPxGridView Width="100%" ID="ASPxGridView1" runat="server"
AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
KeyFieldName="Receipt_No" >
…
<SettingsBehavior AutoExpandAllGroups="true" />
aspx.vb:
Protected Sub ReceiptGrid_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
…
If IsPostBack Then
ASPxGridView1.SettingsBehavior.AutoExpandAllGroups = "true"
End If
Hope I am making sense.
Thank you.
Steps to Reproduce:
- run the project
- filter the grid by setting the ProductId to 78
- clear the filter
Hi Matt,
Thank you for the report. I think that this behavior is wrong and thus I've converted your question to a bug report. You will be notified when its status is changed.
Thanks,
Plato
Thanks, I look forward to seeing a solution.
Hi Matt,
We've researched the problem and come to the conclusion that this behavior is by design. This property (AutoExpandAllGroups) is only applied if
If you want to have all groups to be always expanded, call the ASPxGridView.ExpandAll methods within the AfterPerformCallback event handler.
Thanks,
Plato
that worked great, I appreciate it. the code i used was
VB:
Protected Sub ASPxGridView1_AfterPerformCallback(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewAfterPerformCallbackEventArgs) Handles ASPxGridView1.AfterPerformCallback
ASPxGridView1.ExpandAll()
End Sub
You are always welcome, Matt
Thanks,
Plato