TreeDataGrid column layout doesn't save

Hi,

I’m using Cuba Platform 7.2.11.

I ran into a strange behavior reported by one of my user.

21C88C67-9CA8-41F9-B312-86F831613357

The Select All/De select All columns dropping down from small wheel doesn’t save the changes. When I close my screen and reopen, the changes in the column are lost.

Below is the TreeDataGrid Code I have in my screen.

<treeDataGrid id="assetsTable"
                              width="100%"
                              dataContainer="assetsDc"
                              hierarchyProperty="parentAsset">
                    <actions>
                        <action id="create" type="create"/>
                        <action id="edit" type="edit"/>
                        <action id="remove" type="remove"/>
                        <action id="excel" type="excel"/>
                    </actions>
                    <columns>
                        <column property="assetId"/>
                        <column property="tagNo"/>
                        <column property="type" id="assetTypeColumn"/>
                        <column property="description"/>
                        <column property="location" id="locationColumn"/>
                        <column property="status"/>
                        <column id="prd" caption="msg://prd"/>
                        <column id="inspectionInterval" property="inspectionInterval" collapsed="true"/>
                        <column id="lastInspectionDt" property="lastInspectionDt" collapsed="true"/>
                        <column id="nextInspectionDt" property="nextInspectionDt" collapsed="true"/>
                        <column id="jurNo" property="jurNo" collapsed="true"/>
                        <column id="crnNo" property="crnNo" collapsed="true"/>
                    </columns>
                    <buttonsPanel id="buttonsPanel"
                                  alwaysVisible="true">
                        <button id="createBtn" action="assetsTable.create"/>
                        <button id="editBtn" action="assetsTable.edit"/>
                        <button id="removeBtn" action="assetsTable.remove"/>
                        <button id="assetsTableExcelBtn" action="assetsTable.excel"/>
                    </buttonsPanel>
                    <rowsCount/>
                </treeDataGrid>

I think this is bug with TreeDataGrid, may be same issue may existing in other table, group table, data grid as well.

Thanks Hari

Hi,

It seems that <column id="prd" caption="msg://prd"/> is a generated column because it doesn’t define the property attribute. If Table/DataGrid contains generated columns then user settings can’t be applied.

Regards,
Gleb

oh! It doesn’t work for only for that Generated Column or all other columns as well?

For me when selecting / removing columns manually saves it to user settings, but when I do select All / Deselect all it doesn’t save.

I think you guys can investigate this behavior and give a reasonable fix.

Thanks
Hari

If the user setting cannot be applied for generated column its okay. For other columns it should be applied right. Why other columns are not saving only when selectAll is done?

Hi @gorelov,

Is there any way I can fix this?

Thanks,
Hari

As a workaround, you can define a generated column in XML, so the number of saved columns and loaded will be the same.

I don’t get you. I have that column defined in XML. How can I change that?

I have the column defined in XML only. Still this issue is there. When do you think I can get the fix?

Could you please send us a small demo project that reproduces the issue along with reproducing scenario?

Hi @gorelov,

It seems like it has nothing to do with Generated columns. Even with normal columns in TreeDataGrid, SelectAll and DeselectAll doesn’t save.

Please find and dowload the sample project below.

Thanks,
Hari

Thank you for reporting the problem, I’ve created a GitHub issue.

Gleb

Thanks