Ajax 控件工具包 TabContainer 与 UserControl (ascx) 的问题
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上并不是这个特定问题的解决方案。但是,它应该允许您继续开发,因此我将其发布在这里。我建议您使用 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.