Telerik RadGrid没有打开弹出编辑器

时间:2013-11-18 07:47:27

标签: telerik popup telerik-grid

我有一个显示客户列表的Telerik Radgrid。在网格中,我有一个命令按钮,它应该打开一个弹出编辑器来添加新客户。出于某种原因,弹出窗口无法打开。它显示一个小闪烁,没有任何反应。奇怪的是,如果我进入数据库,手动添加客户记录并刷新网格,我就可以打开编辑器。

这是我的ascx中的网格定义:

<telerik:RadGrid ID="CustomerList" runat="server" 
    GroupingEnabled="False" ShowStatusBar="True" OnPreRender="CustomerList_PreRender"
    DataSourceID="CustomerDataSource"
    OnItemCommand="CustomerList_ItemCommand" OnItemDataBound="CustomerList_ItemDataBound"
    OnInsertCommand="CustomerList_InsertCommand" OnItemInserted="CustomerList_ItemInserted" 
    OnItemEvent="CustomerList_ItemEvent" >

    <MasterTableView DataKeyNames="CustomerId" DataSourceID="CustomerDataSource"  
        AllowPaging="true" AutoGenerateColumns="False"
        GridLines="None" EditMode="PopUp" ShowFooter="True" 
        InsertItemDisplay="Bottom" CommandItemDisplay="TopAndBottom" >
        <CommandItemSettings  AddNewRecordText="Add Customer" />
        <Columns>
            <telerik:GridBoundColumn DataField="CustomerId" DataType="System.Int32" FilterControlAltText="Filter CustomerId column" HeaderText="CustomerId" ReadOnly="True" SortExpression="CustomerId" UniqueName="CustomerId">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CustomerName" FilterControlAltText="Filter CustomerName column" HeaderText="CustomerName" SortExpression="CustomerName" UniqueName="CustomerName">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>


            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                <ItemStyle Width="20px" Font-Underline="true" />
            </telerik:GridEditCommandColumn>

        </Columns>
        <NoRecordsTemplate>
            No customers have been created yet.
        </NoRecordsTemplate>
        <EditFormSettings EditFormType="WebUserControl" CaptionDataField="CustomerName"
            UserControlName="~/UserControls/CustomerEditor.ascx"
            >
            <EditColumn UniqueName="EditCommandColumn" HeaderButtonType="TextButton">
            </EditColumn>
            <PopUpSettings ScrollBars="None" Width="581"/>
        </EditFormSettings>
        <PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" />
    </MasterTableView>
</telerik:RadGrid>

欢迎任何帮助!

0 个答案:

没有答案
相关问题