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:
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:
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!
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!