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

RadGrid Ajax Response Hanging

2 Answers 137 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 24 Mar 2016, 08:57 PM

I have a radgrid with two gridtableviews in the detailtables.

<telerik:RadGrid ID="rgJurisdictionPermitSearch" CssClass="radGrid" runat="server" DataSourceID="dsJurisdictionPermitSearch" Skin="MetroTouch" AutoGenerateColumns="False" MasterTableView-NoDetailRecordsText="There are no permits to display." MasterTableView-DataKeyNames="PID" MasterTableView-ClientDataKeyNames="PID" CellSpacing="-1" GridLines="Both" OnDetailTableDataBind="rgJurisdictionPermitSearch_DetailTableDataBind" OnItemCommand="rgJurisdictionPermitSearch_ItemCommand" EnableLinqExpressions="False" AllowSorting="True" GroupPanelPosition="Top" RenderMode="Auto" AllowPaging="true" PageSize="20" Width="100%" Font-Size="0.8em">
    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
 
    <AlternatingItemStyle Font-Size="0.8em" />
    <GroupHeaderItemStyle Font-Size="0.8em" />
 
    <MasterTableView DataSourceID="dsJurisdictionPermitSearch" DataKeyNames="PID">
 
        <CommandItemTemplate>
            <telerik:RadButton ID="btnRefresh" runat="server" CommandArgument="Refresh" CommandName="Refresh" Text="Refresh"></telerik:RadButton>
        </CommandItemTemplate>
 
        <Columns>
            <telerik:GridBoundColumn DataField="PermitID" FilterControlAltText="Filter PermitID column" HeaderText="Permit #" ReadOnly="True" SortExpression="PermitID" UniqueName="PermitID">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <%--<telerik:GridBoundColumn DataField="MoveStartTime" DataType="System.DateTime" FilterControlAltText="Filter MoveStartTime column" HeaderText="Move Start" ReadOnly="True" SortExpression="MoveStartTime" UniqueName="MoveStartTime">
            <ColumnValidationSettings>
                <ModelErrorMessage Text="" />
            </ColumnValidationSettings>
        </telerik:GridBoundColumn>--%>
 
            <telerik:GridTemplateColumn DataField="MoveStartTime" DataType="System.DateTime" FilterControlAltText="Filter MoveStartTime column" HeaderText="Move Start" ReadOnly="True" SortExpression="MoveStartTime" UniqueName="MoveStartTime">
                <ItemTemplate>
                    <asp:Label ID="lblMoveStart" runat="server" Text='<%# DateTime.Parse(Eval("MoveStartTime").ToString()).ToShortDateString() %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
            <telerik:GridBoundColumn DataField="PermitStatus" FilterControlAltText="Filter PermitStatus column" HeaderText="Permit Status" ReadOnly="True" SortExpression="PermitStatus" UniqueName="PermitStatus">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="ClientID" FilterControlAltText="Filter ClientID column" HeaderText="ClientID" ReadOnly="True" SortExpression="ClientID" UniqueName="ClientID" Visible="false">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text=""></ModelErrorMessage>
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="ClientName" FilterControlAltText="Filter ClientName column" HeaderText="Client" ReadOnly="True" SortExpression="ClientName" UniqueName="ClientName">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="Commodity" FilterControlAltText="Filter Commodity column" HeaderText="Commodity" ReadOnly="True" SortExpression="Commodity" UniqueName="Commodity">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="Unit" FilterControlAltText="Filter Unit column" HeaderText="Unit No." ReadOnly="True" SortExpression="Unit" UniqueName="Unit">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="ClientVehicleID" FilterControlAltText="Filter ClientVehicleID column" HeaderText="ClientVehicleID" ReadOnly="True" SortExpression="ClientVehicleID" UniqueName="ClientVehicleID" Visible="false">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text=""></ModelErrorMessage>
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="OrigLSD" FilterControlAltText="Filter OrigLSD column" HeaderText="Orig. LSD" ReadOnly="True" SortExpression="OrigLSD" UniqueName="OrigLSD">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="DestLSD" FilterControlAltText="Filter DestLSD column" HeaderText="Dest. LSD" ReadOnly="True" SortExpression="DestLSD" UniqueName="DestLSD">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <telerik:GridTemplateColumn DataField="PermitInspection" DataType="System.Double" FilterControlAltText="Filter PermitInspection column" HeaderText="Has Inspection" ReadOnly="True" SortExpression="PermitInspection" UniqueName="PermitInspection">
                <ItemTemplate>
                    <%# Eval("PermitInspection") != null ? (Eval("PermitInspection").ToString() == "1" ? "YES" : "NO") : "NO" %>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
            <telerik:GridBoundColumn DataField="InspectionFee" DataType="System.Double" FilterControlAltText="Filter InspectionFee column" HeaderText="Inspection Fee" ReadOnly="True" SortExpression="InspectionFee" UniqueName="InspectionFee" DataFormatString="{0:C}">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
            <%-- CREATE TICKETS --%>
            <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Add Inspection" ItemStyle-Wrap="false" UniqueName="CreateInspection">
                <ItemTemplate>
                    <telerik:RadButton ID="btnInsertInspection" runat="server" CommandName="InsertInspection" Text="Inspection" Skin="MetroTouch" Style="position: relative;" Font-Size="0.9em" />
                </ItemTemplate>
 
                <ItemStyle Wrap="False"></ItemStyle>
            </telerik:GridTemplateColumn>
 
        </Columns>
 
        <DetailTables>
            <telerik:GridTableView Name="dgvPermitInspections" runat="server" AllowFilteringByColumn="false" DataKeyNames="PermitInspectionID"
                DataSourceID="dsPermitInspections" TableLayout="Auto" Width="100%" AllowAutomaticUpdates="true" AllowAutomaticInserts="true" AllowAutomaticDeletes="true" EditFormSettings-EditFormType="AutoGenerated" EditMode="EditForms">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="PID" MasterKeyField="PID" />
                </ParentTableRelation>
 
                <EditFormSettings EditColumn-ButtonType="PushButton">
                    <EditColumn ButtonType="PushButton"></EditColumn>
                </EditFormSettings>
 
                <Columns>
 
                    <telerik:GridBoundColumn DataField="PermitInspectionID" UniqueName="PermitInspectionID" ReadOnly="true" Visible="false">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
 
                    <telerik:GridTemplateColumn ColumnGroupName="Edit" UniqueName="EditCommandInspection" Display="true" Visible="true">
                        <ItemTemplate>
                            <telerik:RadButton ID="btnEditInspection" runat="server" Text="Edit" CommandArgument="Edit" CommandName="Edit" Skin="MetroTouch"></telerik:RadButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn DataField="InspectionType" HeaderText="Inspection Type" UniqueName="InspectionType" FilterControlAltText="Filter InspectionType column" ReadOnly="false" SortExpression="InspectionType" ItemStyle-Width="10%" HeaderStyle-Width="10%">
                        <ItemTemplate>
                            <asp:Label ID="lblInspectionType" runat="server" Text='<%# Eval("InspectionType") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="rcmbInspectionType" runat="server" SelectedValue='<%# Bind("InspectionType") %>'>
                                <Items>
                                    <telerik:RadComboBoxItem Text="PRE" Value="PRE" />
                                    <telerik:RadComboBoxItem Text="POST" Value="POST" />
                                </Items>
                            </telerik:RadComboBox>
                            <asp:RequiredFieldValidator ID="rfvClassID" runat="server" ControlToValidate="rcmbInspectionType"
                                CssClass="invalid" ErrorMessage="Class is required."></asp:RequiredFieldValidator>
                        </EditItemTemplate>
 
                        <HeaderStyle Width="10%"></HeaderStyle>
 
                        <ItemStyle Width="10%"></ItemStyle>
                    </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn DataField="Notes" FilterControlAltText="Filter Notes column" HeaderText="Inspection Notes" ReadOnly="false" SortExpression="Notes" UniqueName="Notes" ItemStyle-Width="90%" HeaderStyle-Width="90%">
                        <ItemTemplate>
                            <asp:Label ID="lblInspectionNotes" runat="server" Text='<%# Eval("Notes") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="txtEditNotes" runat="server" TextMode="MultiLine" Rows="10" Text='<%# Bind("Notes") %>' Width="100%"></telerik:RadTextBox>
                        </EditItemTemplate>
 
                        <HeaderStyle Width="90%"></HeaderStyle>
 
                        <ItemStyle Width="90%"></ItemStyle>
                    </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn ColumnGroupName="Delete" UniqueName="DeleteColumn" Display="true" Visible="true">
                        <ItemTemplate>
                            <telerik:RadButton ID="btnDeleteInspection" runat="server" Text="Delete" CommandArgument="Delete" CommandName="Delete" Skin="MetroTouch"></telerik:RadButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
 
                </Columns>
            </telerik:GridTableView>
 
            <telerik:GridTableView Name="dgvPermitDetails" runat="server" AllowFilteringByColumn="false" DataKeyNames="PID" DataSourceID="dsPermitDetails" TableLayout="Fixed" Width="100%">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="PID" MasterKeyField="PID" />
                </ParentTableRelation>
                <Columns>
                    <telerik:GridTemplateColumn DataField="PID" HeaderText="Permit Details" UniqueName="PermitDetails">
                        <ItemTemplate>
                            <div style="height: 620px;">
                                <telerik:ReportViewer ID="rvPermitMoveSummary" runat="server" OnInit="rvPermitMoveSummary_Init" Height="500px" Visible="true" Width="100%" Skin="WebBlue" CssClass="RadGridReportViewer"></telerik:ReportViewer>
                            </div>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
 
    </MasterTableView>
    <EditItemStyle Font-Size="0.8em" />
    <FooterStyle Font-Size="0.8em" />
    <HeaderStyle Font-Size="0.8em" />
    <FilterItemStyle Font-Size="0.8em" />
    <CommandItemStyle Font-Bold="False" Font-Italic="False" Font-Size="0.8em" ForeColor="Black" />
    <ActiveItemStyle Font-Size="0.8em" />
    <ItemStyle Font-Size="0.8em" ForeColor="Black" />
    <SelectedItemStyle Font-Size="0.8em" />
 
    <FilterMenu RenderMode="Auto"></FilterMenu>
 
    <HeaderContextMenu RenderMode="Auto"></HeaderContextMenu>
</telerik:RadGrid>

 

The page that the grid is in uses a master page and it has a radajaxmanagerproxy control.

<telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnRefresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="hfJurisdictionID" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rgJurisdictionPermitSearch" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rvMovementByJurisdiction" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnReset">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="txtPermitNo" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="cmbClient" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="cmbClientVehicle" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="dpDateFrom" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="dpDateTo" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="txtApprovalNo" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="txtLSD" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="txtRoad" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="txtOilCompany" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="cmbInspection" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rgJurisdictionPermitSearch" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rvMovementByJurisdiction" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="cmbClient">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="cmbClient" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="cmbClientVehicle" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnShowReportGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="hfJurisdictionID" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="btnShowReportGrid" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="btnRefresh" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rgJurisdictionPermitSearch" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rvMovementByJurisdiction" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnShowBoth">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btnShowBoth" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="btnShowReportGrid" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="btnRefresh" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="hfJurisdictionID" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rgJurisdictionPermitSearch" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rvMovementByJurisdiction" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rgJurisdictionPermitSearch">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgJurisdictionPermitSearch" LoadingPanelID="LoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="hfJurisdictionID" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

All of the controls respond just fine except for the first gridtableview in the detailgrids in the radgrid.

There is an Inspection command button in the last column of the radgrid that opens up the insert form for the gridtableview .

01.protected void rgJurisdictionPermitSearch_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) {
02.        try {
03.            if (e.CommandName == "InsertInspection") {
04.                GridDataItem item = (GridDataItem)e.Item;
05.                if (!item.Expanded) {
06.                    item.Expanded = true;
07.                }
08.                GridTableView childTable = item.ChildItem.NestedTableViews[0];
09.                childTable.IsItemInserted = true;
10. 
11.                childTable.Rebind();
12.            }
13.            else if (e.CommandName == "PerformInsert") {
14.                EnterLog("Inspection Inserted", "User " + WebSecurity.CurrentUserName + " inserted a permit inspection.");
15.            }
16.            else if (e.CommandName == "Update") {
17.                EnterLog("Inspection Updated", "User " + WebSecurity.CurrentUserName + " updated a permit inspection.");
18.            }
19.            else if (e.CommandName == "Delete") {
20.                EnterLog("Inspection Deleted", "User " + WebSecurity.CurrentUserName + " deleted a permit inspection.");
21.            }
22. 
23.            FixTelerikCSS();
24.        }
25.        catch (Exception ex) {
26.            Master.SendErrorEmail(ex, System.IO.Path.GetFileName(Request.PhysicalPath), System.Reflection.MethodInfo.GetCurrentMethod().Name);
27.        }
28.    }

 

It works perfectly when I run it from Visual Studio 2012 in every browser, but the live site has a major issue with the first gridtableview.

On the live site when I try to insert or edit the detailgrid it will hang forever, although it delets just fine.

I don't get any error, I just have the loading image stuck and I have to reload the page to get a response.

I've tried hooking up my development to the live database and it worked so it's not that.

I'm scratching my brain as to why it's just the gridtableview that doesn't work with the ajax live.

When I remove the radajaxmanagerproxy control the gridtableview insert and update works.

I don't believe I'm missing a dll.

Here is the list of dlls I have:

  1. Telerik.Reporting.dll
  2. Telerik.Reporting.Service.dll
  3. Telerik.ReportViewer.WebForms.dll
  4. Telerik.Web.Design.dll
  5. Telerik.Web.Device.Detection.dll
  6. Telerik.Web.UI.dll
  7. Telerik.Web.UI.Skins.dll
  8. Telerik.Windows.Documents.Core.dll
  9. Telerik.Windows.Documents.Flow.dll
  10. Telerik.Windows.Documents.Spreadsheet.dll
  11. Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll
  12. Telerik.Windows.Maths.dll
  13. Telerik.Windows.Zip.dll

My product version is 2014.3.1209.45

How do I even try to figure out what the issue is?

2 Answers, 1 is accepted

Sort by
0
Brad
Top achievements
Rank 1
answered on 25 Mar 2016, 12:04 AM

Also on my Master page for this page.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
    </Scripts>
</telerik:RadScriptManager>
 
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Skin="MetroTouch" CssClass="MyModalPanel" />
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

0
Brad
Top achievements
Rank 1
answered on 25 Mar 2016, 02:35 AM

Figured this one out myself.

The RequiredFieldValidator was the issue and I removed it, and it's all working.

<asp:RequiredFieldValidator ID="rfvClassID" runat="server" ControlToValidate="rcmbInspectionType"
                                CssClass="invalid" ErrorMessage="Class is required.">

Tags
Ajax
Asked by
Brad
Top achievements
Rank 1
Answers by
Brad
Top achievements
Rank 1
Share this question
or