Ajax 控件工具包 TabContainer 与 UserControl (ascx) 的问题

发布于 2024-11-23 18:26:56 字数 3705 浏览 1 评论 0原文

我正在使用 DevExpress ASPxGridView 来显示、插入、编辑数据。为了插入和编辑,我使用 Templates->EditForm 并对列进行分组,我使用 Ajax Control Toolkit 中的 TabContainer,并且在一个选项卡中我想使用 UserControl (ascx) 来管理属性。 不幸的是,渲染它时存在一些问题,因为它不适合 TabPanel 并且从面板中伸出。

<dx:ASPxGridView ID="ASPxGridView_Contractors" runat="server" Width="100%" 
AutoGenerateColumns="False" ClientIDMode="AutoID" 
DataSourceID="ObjectDataSource_Contractors" KeyFieldName="ContractorId" 
EnableCallBacks="False" ondetailrowexpandedchanged="ASPxGridView_Contractors_DetailRowExpandedChanged"
>
<Columns>
    /* some columns */
</Columns>
<SettingsBehavior AllowFocusedRow="True" />
<Settings ShowFilterRow="True" ShowGroupPanel="True" />
<SettingsDetail ShowDetailRow="True" />
<Templates>
    <DetailRow>
        /* detail row */
    </DetailRow>
    <EditForm> 
        <div style="padding: 3px 3px 2px 3px">

            <asp:TabContainer ID="TabContainer_ContractorDetailsEdit" runat="server" AutoPostBack="true">

                <asp:TabPanel ID="TabPanel_GeneralEdit" runat="server" HeaderText="<%$Resources:Tags, General %>" >
                    <ContentTemplate>
                        /* General */
                    </ContentTemplate>
                </asp:TabPanel> 

                <asp:TabPanel ID="TabPanel_AddressEdit" runat="server" HeaderText="<%$Resources:Tags, Address %>" >
                    <ContentTemplate>
                        /* Address */                            
                    </ContentTemplate>
                </asp:TabPanel>  

                <asp:TabPanel ID="TabPanel_ContractorDescriptionEdit" runat="server" HeaderText="<%$Resources:Tags, Description %>">
                    <ContentTemplate>
                        <dx:ASPxMemo runat="server" ID="ASPxMemo_DescriptionEdit" Text='<%# Eval("Description")%>' 
                            Width="100%" Height="93px">
                        </dx:ASPxMemo>
                    </ContentTemplate>
                </asp:TabPanel>

                <asp:TabPanel ID="TabPanel_ContactDataEdit" runat="server" HeaderText="<%$Resources:Tags, ContactData %>" >
                    <ContentTemplate>
                        /* ContactData */  
                    </ContentTemplate>
                </asp:TabPanel>  

                <asp:TabPanel ID="TabPanel_AttributesEdit" runat="server" HeaderText="<%$Resources:Tags, Attributes %>" >
                    <ContentTemplate>
                        /* problem */
                        <uc:Attributes ID="ContractorAttributes_Edit" runat="server" Editable="true" Source="Contractor"/> <-- problem
                    </ContentTemplate>
                </asp:TabPanel>

                <asp:TabPanel ID="TabPanel_SystemsEdit" runat="server" HeaderText="<%$Resources:Tags, Systems %>" >
                    <ContentTemplate>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
            <dx:ASPxGridViewTemplateReplacement runat="server" ID="tr_UpdateButton" 
                ReplacementType="EditFormUpdateButton">
            </dx:ASPxGridViewTemplateReplacement>

            <dx:ASPxGridViewTemplateReplacement runat="server" ID="tr_CancelButton" 
                ReplacementType="EditFormCancelButton">
            </dx:ASPxGridViewTemplateReplacement>
        </div>
    </EditForm>
</Templates>

我做错了什么吗?

I'm using DevExpress ASPxGridView to show, insert, edit data. To insert and edit I'm using Templates->EditForm and to group columns I'm using TabContainer from Ajax Control Toolkit and in one tab I want to use UserControl (ascx) to manage the attributes.
Unfortunately there is some problem with rendering it, because it doesn't fit into TabPanel and it sticks out from the panel.

<dx:ASPxGridView ID="ASPxGridView_Contractors" runat="server" Width="100%" 
AutoGenerateColumns="False" ClientIDMode="AutoID" 
DataSourceID="ObjectDataSource_Contractors" KeyFieldName="ContractorId" 
EnableCallBacks="False" ondetailrowexpandedchanged="ASPxGridView_Contractors_DetailRowExpandedChanged"
>
<Columns>
    /* some columns */
</Columns>
<SettingsBehavior AllowFocusedRow="True" />
<Settings ShowFilterRow="True" ShowGroupPanel="True" />
<SettingsDetail ShowDetailRow="True" />
<Templates>
    <DetailRow>
        /* detail row */
    </DetailRow>
    <EditForm> 
        <div style="padding: 3px 3px 2px 3px">

            <asp:TabContainer ID="TabContainer_ContractorDetailsEdit" runat="server" AutoPostBack="true">

                <asp:TabPanel ID="TabPanel_GeneralEdit" runat="server" HeaderText="<%$Resources:Tags, General %>" >
                    <ContentTemplate>
                        /* General */
                    </ContentTemplate>
                </asp:TabPanel> 

                <asp:TabPanel ID="TabPanel_AddressEdit" runat="server" HeaderText="<%$Resources:Tags, Address %>" >
                    <ContentTemplate>
                        /* Address */                            
                    </ContentTemplate>
                </asp:TabPanel>  

                <asp:TabPanel ID="TabPanel_ContractorDescriptionEdit" runat="server" HeaderText="<%$Resources:Tags, Description %>">
                    <ContentTemplate>
                        <dx:ASPxMemo runat="server" ID="ASPxMemo_DescriptionEdit" Text='<%# Eval("Description")%>' 
                            Width="100%" Height="93px">
                        </dx:ASPxMemo>
                    </ContentTemplate>
                </asp:TabPanel>

                <asp:TabPanel ID="TabPanel_ContactDataEdit" runat="server" HeaderText="<%$Resources:Tags, ContactData %>" >
                    <ContentTemplate>
                        /* ContactData */  
                    </ContentTemplate>
                </asp:TabPanel>  

                <asp:TabPanel ID="TabPanel_AttributesEdit" runat="server" HeaderText="<%$Resources:Tags, Attributes %>" >
                    <ContentTemplate>
                        /* problem */
                        <uc:Attributes ID="ContractorAttributes_Edit" runat="server" Editable="true" Source="Contractor"/> <-- problem
                    </ContentTemplate>
                </asp:TabPanel>

                <asp:TabPanel ID="TabPanel_SystemsEdit" runat="server" HeaderText="<%$Resources:Tags, Systems %>" >
                    <ContentTemplate>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
            <dx:ASPxGridViewTemplateReplacement runat="server" ID="tr_UpdateButton" 
                ReplacementType="EditFormUpdateButton">
            </dx:ASPxGridViewTemplateReplacement>

            <dx:ASPxGridViewTemplateReplacement runat="server" ID="tr_CancelButton" 
                ReplacementType="EditFormCancelButton">
            </dx:ASPxGridViewTemplateReplacement>
        </div>
    </EditForm>
</Templates>

Am I doing something wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞旧 2024-11-30 18:26:56

这实际上并不是这个特定问题的解决方案。但是,它应该允许您继续开发,因此我将其发布在这里。我建议您使用 ASPxPerience Suite 中的 ASPxPageControl,一切都会正常工作。

This is not actually the solution to this particular problem. However, it should allow you to continue development and thus I post it here. I would suggest that you use the ASPxPageControl from the ASPxPerience Suite, everything will work properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文