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

Have to click on "Edit" link three times in Radgrid to show Popup edit window

2 Answers 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 12 Jan 2015, 07:32 PM
Hello,

I'm having a problem with my RadGrid's Edit feature where I have  to click on the "Edit" link three times for the popup modal window to appear.  I set the DataSource for my grid in the "NeedDataSource" event handler:
protected void grdViewInventory_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    int? siteID = ApplicationInformation.GetSiteID();
    grdViewInventory.DataSource = BLL.GetInventory(siteID);
}

The data is coming from a view inside of my Entity Framework model as an IList.

I don't generate columns automatically.  Here's what my grid code looks like:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wucInventoryView.ascx.cs" Inherits="FACApps.Module.ESPSMT.wucInventoryView" %>
<telerik:RadAjaxLoadingPanel ID="alpViewInventory" runat="server" Height="75px" Width="75px"
    Transparency="5">
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
        style="border: 0;" />
</telerik:RadAjaxLoadingPanel>
<telerik:RadGrid ID="grdViewInventory" runat="server" AllowPaging="True" AllowSorting="True"
    GroupPanelPosition="Top" Height="1000px" Width="100%"
    OnNeedDataSource="grdViewInventory_NeedDataSource" Skin="Silk" EnableEmbeddedSkins="true">
    <MasterTableView AutoGenerateColumns="False" EditMode="PopUp" PageSize="200">
        <GroupHeaderTemplate>
            <asp:Label runat="server" ID="Label1" Text='<%# Eval("Building") %>' />
            <asp:Label runat="server" ID="Label2" Text='<%# "(" + Eval("PropertyNumber") + ")" %>' />
            <asp:Label runat="server" ID="Label4" Text='<%# Eval("UnitTag") %>' />
            <asp:Label runat="server" ID="Label3" Text='<%# Eval("AHUType") %>' />
        </GroupHeaderTemplate>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="Building" />
                    <telerik:GridGroupByField FieldName="PropertyNumber" />
                    <telerik:GridGroupByField FieldName="UnitTag" FieldAlias="UnitTag" FormatString="" HeaderText=""></telerik:GridGroupByField>
                    <telerik:GridGroupByField FieldName="AirHandlerType_Description" FieldAlias="AHUType" FormatString="" HeaderText=""></telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="Building" SortOrder="Ascending" />
                    <telerik:GridGroupByField FieldName="PropertyNumber" SortOrder="Ascending" />
                    <telerik:GridGroupByField FieldName="UnitTag" FieldAlias="UnitTag" FormatString="" HeaderText=""></telerik:GridGroupByField>
                    <telerik:GridGroupByField FieldName="AirHandlerType_Description" FieldAlias="AHUType" FormatString="" HeaderText=""></telerik:GridGroupByField>
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" >
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="PropertyNumber" HeaderText="Property ID" ReadOnly="True" SortExpression="PropertyNumber" UniqueName="PropertyNumber" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Building" HeaderText="Property Name" ReadOnly="True" SortExpression="Building" UniqueName="Building" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="UnitTag" HeaderText="Unit Tag" ReadOnly="True" SortExpression="UnitTag" UniqueName="UnitTag" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AirHandlerType_Description" HeaderText="AHU Type" ReadOnly="True" SortExpression="AirHandlerType_Description" UniqueName="AirHandlerType_Description" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AHU_Manufacturer" HeaderText="AHU Mfgr" ReadOnly="True" SortExpression="AHU_Manufacturer" UniqueName="AHU_Manufacturer" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FilterType" HeaderText="" ReadOnly="True" SortExpression="FilterType" UniqueName="FilterType">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Bank_description" HeaderText="Filter Bank" ReadOnly="True" SortExpression="Bank_description" UniqueName="Bank_description" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ModelNumber" HeaderText="" ReadOnly="True" SortExpression="ModelNumber" UniqueName="ModelNumber">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FilterManufacturer" HeaderText="Filter Mfgr" ReadOnly="True" SortExpression="FilterManufacturer" UniqueName="FilterManufacturer" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FilterDimension" HeaderText="" ReadOnly="True" SortExpression="FilterDimension" UniqueName="FilterDimension">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Quantity" HeaderText="" ReadOnly="True" SortExpression="FilterManufacturer" UniqueName="FilterManufacturer">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Dimension" HeaderText="" ReadOnly="True" SortExpression="Dimension" UniqueName="Dimension">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="PartNumber" HeaderText="" ReadOnly="True" SortExpression="PartNumber" UniqueName="PartNumber">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings EditFormType="WebUserControl" UserControlName="Modules\ESPSMT\wucInventoryEdit.ascx">
            <EditColumn UniqueName="EditCommandColumn" FilterControlAltText="Filter EditCommandColumn1 column" ></EditColumn>
            <PopUpSettings ScrollBars="None" Modal="true" ZIndex="100010" />
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>


As you can see my grid is inside a WebUserControl. Can anyone please tell me why I have to click on the "Edit" button multiple times?  I don't see anything in my code that should cause this behavior.  Thanks!

2 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 15 Jan 2015, 12:23 PM
Hello Shawn,

Based on the provided information will be hard to pinpoint the reason for that behavior. Could you please let me know how you are loading the user control on the page? I would recommend you to prepared a small runnable sample and open a support ticket as in this case we can debug the code and provide you with straight forward solution.

Regards,
Kostadin
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.

 
0
Shawn
Top achievements
Rank 1
answered on 15 Jan 2015, 12:34 PM
Hello Kostadin,

Thank you for your reply.  I was able to find a solution to this issue here.  Thanks for your help.

Regards,
Shawn Aghdam
Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Shawn
Top achievements
Rank 1
Share this question
or