ASPxGridView EditForm自定义

问题描述 投票:0回答:1

我创建了一个GridView,我想自定义编辑表单。我需要隐藏/删除或排列编辑中的项目。例如,将文本框从左上角移动到右下角,或从编辑表单中删除。

有可能的?

<EditForm>
            <div style="padding: 4px 4px 3px 4px">
                <dx:ASPxPageControl runat="server" ID="pageControl1" Width="100%" ActiveTabIndex="0">
                    <TabPages>
                        <dx:TabPage Text="Edit" Visible="true">
                            <ContentCollection>
                                <dx:ContentControl ID="ContentControl1" runat="server">
                                    <dx:ASPxGridViewTemplateReplacement ID="Edit" ViewStateMode="Enabled" ReplacementType="EditFormEditors"
                                        runat="server">
                                    </dx:ASPxGridViewTemplateReplacement>
                                    <div style="text-align: right; padding: 2px">
                                        <dx:ASPxGridViewTemplateReplacement ID="UpdateButton" ReplacementType="EditFormUpdateButton"
                                            runat="server">
                                        </dx:ASPxGridViewTemplateReplacement>
                                        <dx:ASPxGridViewTemplateReplacement ID="CancelButton" ReplacementType="EditFormCancelButton"
                                            runat="server">
                                        </dx:ASPxGridViewTemplateReplacement>
                                    </div>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>

                        <dx:TabPage Text="Edit2" Visible="true">
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>

                    </TabPages>
                </dx:ASPxPageControl>
        </EditForm>

提前致谢。

asp.net devexpress customization edit aspxgridview
1个回答
0
投票

对的,这是可能的。这可以通过定义ASPxGridView的EditFormTemplate来完成。有两个演示项目展示了如何做到这一点:

Grid Editing - Edit Form Template

Grid Editing - Two-Way Binding

以下是帮助主题,它也可能对您有所帮助:

GridViewTemplates.EditForm Property

© www.soinside.com 2019 - 2024. All rights reserved.