This is a migrated thread and some comments may be shown as answers.

RadGrid not opening popup editor when no records

3 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yosief
Top achievements
Rank 2
Yosief asked on 18 Nov 2013, 07:51 AM
Hi All

I've a radgrid displaying a list of customers. In the grid, I have a command button that's supposed to open a popup editor to add new customers. For some reason, the popup does not open. It shows a small flicker and nothing happens. Strangely enough, if I go into the database, manually add a customer record and refresh the grid, I'm able to open the editor.

Any help is most welcome!

Here is the grid definition in my 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>

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 20 Nov 2013, 03:26 PM
Hello Yosief,

The behavior you describe seems rather strange. I tried reproducing the problem with the grid settings from your post, however it seems to work as expected on my end. Sample project with dummy data source is attached for illustration. Could you give it a try and let me know if it is working on your side?

If I am missing something could you modify the project in a way that the issue is reproduced and send it back in a support ticket. This would enable us to investigate the problem locally and provide an appropriate solution.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Carole
Top achievements
Rank 1
answered on 31 Mar 2014, 09:58 AM
Hi Yosief
I hope you'll be able to save me ! I have this exact problem and tried to fix this the last three days !
This happens on ONE server and working everywhere else, this is really strange !
Did you manage to resolve this ?
Thanks in advance.
0
Viktor Tachev
Telerik team
answered on 03 Apr 2014, 07:30 AM
Hi Carole,

The popup edit form could be prevented from opening if there are JavaScript errors on the page. Please ensure that there are no such errors.

Also could you share your full markup with the related code-behind and describe what are the steps to reproduce the problem. This would allow us to try and replicate the issue locally and look for the cause.

Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Yosief
Top achievements
Rank 2
Answers by
Viktor Tachev
Telerik team
Carole
Top achievements
Rank 1
Share this question
or