Adding TemplateColumn causes page controls to stop responding

4 posts, 0 answers
  1. Jackie
    Jackie avatar
    18 posts
    Member since:
    Jan 2016

    Posted 15 Aug 2017 Link to this post

    After adding several templatecolumns to my radgrid none of the controller events fire on the page after initial load. I am using OnNeedDataSource databinding and the data shows correctly. If I refresh the grid schema so they're replaced by generated standard columns the page works normally. Is there something I've set up incorrectly? Sample of the radgrid below:

                    <telerik:RadGrid ID="gridAgents" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" OnNeedDataSource="gridAgents_NeedDataSource" ShowGroupPanel="True"
    OnEditCommand="gridAgents_EditCommand" OnUpdateCommand="gridAgents_UpdateCommand" OnDeleteCommand="gridAgents_DeleteCommand" OnCancelCommand="gridAgents_CancelCommand" OnInsertCommand="gridAgents_InsertCommand" OnItemUpdated="gridAgents_ItemUpdated" OnItemDeleted="gridAgents_ItemDeleted" OnItemInserted="gridAgents_ItemInserted">
                        <GroupingSettings CollapseAllTooltip="Collapse all groups" />
                        <ClientSettings AllowDragToGroup="True">
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False">
                            <Columns>
                                <telerik:GridEditCommandColumn>
                                </telerik:GridEditCommandColumn>
                                <telerik:GridClientDeleteColumn>
                                </telerik:GridClientDeleteColumn>
                                <telerik:GridBoundColumn DataField="DEPT" FilterControlAltText="Filter DEPT column" HeaderText="DEPT" SortExpression="DEPT" UniqueName="DEPT">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="FNAME" FilterControlAltText="Filter FNAME column" HeaderText="FNAME" SortExpression="FNAME" UniqueName="FNAME">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="LNAME" FilterControlAltText="Filter LNAME column" HeaderText="LNAME" SortExpression="LNAME" UniqueName="LNAME">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn DataField="STARTDATE" DataType="System.DateTime" FilterControlAltText="Filter STARTDATE column" HeaderText="STARTDATE" SortExpression="STARTDATE" UniqueName="STARTDATE">
                                    <ItemTemplate>
                                        <asp:Label ID="lblStartDate" runat="server" Text='<%# Eval("STARTDATE") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadDatePicker ID="dpStartDate" runat="server" SelectedDate='<%# Eval("STARTDATE") %>'>
                                            <Calendar runat="server">
                                                <SpecialDays>
                                                    <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="LightGray"></telerik:RadCalendarDay>
                                                </SpecialDays>
                                            </Calendar>
                                        </telerik:RadDatePicker>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>

    It is inside an Update Panel and the page contains a RadAjaxManager. The Masterpage contains the Scriptmanager. Debugging steps through the page load event but after that no controller events are fired and the debugger doesn't pick anything up. Any help would be appreciated.

  2. Eyup
    Admin
    Eyup avatar
    3825 posts

    Posted 18 Aug 2017 Link to this post

    Hello Jackie,

    I can suggest some troubleshooting ideas for this specific case which might prove helpful:

    1. AJAX may sometimes hide both server and client-side errors. Therefore, when developing your app, we highly recommend you to ensure that the functionality works without adding AJAX. Please temporarily disable any AJAX on the page if present (RadAjaxManager, RadAjaxPanel, UpdatePanel, RadXmlHttpPanel, etc.) and enable your script debugger (FireBug or F12) to see whether there are any script or server errors interfering, and make sure that the application works without AJAX. 


    2. Also, note that using RadAjaxPanel/UpdatePanel simultaneously with RadAjaxManager or UpdatePanel ( or implementing multiple wrapped RadAjaxPanels ) is not a supported scenario and we highly recommend to avoid such implementation. Please replace the RadAjaxPanel with regular asp:Panel or remove the RadAjaxManager:
    http://www.telerik.com/help/aspnet-ajax/ajax-controls-in-ajaxpanel-and-ajaxsettings.html


    I hope this will prove helpful.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Jackie
    Jackie avatar
    18 posts
    Member since:
    Jan 2016

    Posted 25 Aug 2017 in reply to Eyup Link to this post

    Removing the UpdatePanel and RadAjax Manager from the page causes the page to postback and work normally with events being fired without issue, but it still doesn't work when just the UpdatePanel is in place. Is there any way to enable ajax functionality to get around this or will I just have to work without even in the release phase?
  4. Eyup
    Admin
    Eyup avatar
    3825 posts

    Posted 30 Aug 2017 Link to this post

    Hello Jackie,

    You can either try using RadAjaxManager or RadAjaxPanel to ajaxify the grid, but not both of them at the same time. 

    To summarize, RadAjaxManager, RadAjaxPanel and UpdatePanel are mutually exclusive for a given control.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top