0
votes

I have a multiple Parent-Child Gridview. The problem is Parent gridview Column name is Cost ($) and the ($) symbol is hiding when i expand the Child gridview and get it back when i minimize the Child gridview (Devexpress). The Parent-Child gridview is present in the AspxCallbackPanel and in the PopupControl.

<dx:ASPxCallbackPanel ID="cbpCartDetails" runat="server" 
        OnCallback="cbpCartDetails_Callback" ClientInstanceName="cbpCartDetails">
    <ClientSideEvents EndCallback="cbpCartDetails_EndCallBack" />
    <PanelCollection>
    <dx:PanelContent ID="pnlCartDetails">
        <dx:ASPxPopupControl ClientInstanceName="popCartDetails" Width="600px" 
            Height="250px" CloseAction="CloseButton" MaxWidth="800px" MaxHeight="800px" 
            MinHeight="150px" MinWidth="150px" ID="popCartDetails"
            HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true"
            runat="server" EnableViewState="false" PopupHorizontalAlign="WindowCenter" 
            PopupVerticalAlign="WindowCenter" EnableHierarchyRecreation="false" 
            Modal="true">
            <ContentCollection>
                <dx:PopupControlContentControl ID="PopupControlContentControl2" 
                                               runat="server">

                    <dx:ASPxGridView ID="grdBuildingCartEst" Width="100%" 
                                     Theme="SoftOrange" KeyFieldName="CarttypeId"
                                     ClientInstanceName="grdBuildingCartEst">
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="CartType" />
                            <dx:GridViewDataTextColumn FieldName="NumberOfCart" />
                            <dx:GridViewDataTextColumn FieldName="Cost" />
                        </Columns>

                        <Templates>
                            <DetailRow>
                                <dx:ASPxGridView ID="grdFloorsCartEst" 
                                        Width="100%" 
                                        Theme="SoftOrange" 
                                        KeyFieldName="CarttypeId" 
                                        OnInit="grdFloorsCartEst_Init" 
                                        OnBeforePerformDataSelect=
                                           "grdFloorsCartEst_BeforePerformDataSelect" 
                                        ClientInstanceName="grdFloorsCartEst">
                                    <Columns>
                                        <dx:GridViewDataTextColumn 
                                            FieldName="CartSize" />
                                        <dx:GridViewDataTextColumn 
                                            FieldName="NumberOfCart" />
                                        <dx:GridViewDataTextColumn 
                                            FieldName="Cost" />
                                    </Columns>    
                                </dx:ASPxGridView>
                            </DetailRow>
                        </Templates>

                        <SettingsDetail ShowDetailRow="true" />

                    </dx:ASPxGridView>                   
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>
    </dx:PanelContent>
</PanelCollection>

Screen shot 1 https://i.stack.imgur.com/Fb1QX.png

Screen shot 2 (Error) https://i.stack.imgur.com/AghdG.png

1

1 Answers

0
votes

notice, in the code you've posted, there is no "Cost ($)" string for the master grid column, only FieldName="Cost". Most probably "Cost ($)" is set to column header at codebehind during Page_Load or some other event.

When you expand the child grid there happens a callback and the event code at codebehind where you set Cost ($) is not executed. So, you need to make sure the column header of the master grid is set to "Cost ($)" during child grid expand callback. To be 100% sure, post/attach the codebehind part of your page/control to the question's text.