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

Adding TemplateColumn causes page controls to stop responding

3 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jackie
Top achievements
Rank 1
Jackie asked on 15 Aug 2017, 05:03 PM

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.

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 18 Aug 2017, 12:10 PM
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.
0
Jackie
Top achievements
Rank 1
answered on 25 Aug 2017, 02:43 PM
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?
0
Eyup
Telerik team
answered on 30 Aug 2017, 10:35 AM
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.
Tags
Grid
Asked by
Jackie
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Jackie
Top achievements
Rank 1
Share this question
or