Ajax Control Toolkit TabContainer problem with UserControl (ascx)
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:TabPa开发者_如何转开发nel 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?
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.
精彩评论