Adding RadGrid breaks RadAjax

2 posts, 0 answers
  1. Steven
    Steven avatar
    29 posts
    Member since:
    Jan 2013

    Posted 30 Mar 2013 Link to this post

    I have a page that contains a RadToolTip.  The ToolTip shows a User Control based dialog when activated. The dialog contains two RadComboBoxes and a Grid. There is also a RadAjaxProxy that controls updateing the interactions between these three controls. This is all working fine.

    On the page that contains the ToolTip, I am trying to add a new Grid. However, when I add the grid, the Ajax between the controls stops working. 

    Here's the Grid I'm trying to add.  Is there a setting in this grid that is interfering with the AJAX in the user control?

                <div style="width: 900px;">
                            <fieldset style="width: 90%">
                                <p>                                                            
                                    <asp:Label ID="lblNoteError" runat="server" EnableViewState="False" Font-Bold="True"
                                        ForeColor="#FF8080"></asp:Label>
                                    <asp:Label ID="lblNoteMessage" runat="server" EnableViewState="False" Font-Bold="True"
                                        ForeColor="#00C000"></asp:Label>
                                    <telerik:RadGrid ID="NotesGrid" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
                                        Width="700px" AllowPaging="False" runat="server" PageSize="20" AllowAutomaticInserts="True"
                                        OnItemDeleted="NotesGrid_ItemDeleted" OnItemUpdated="NotesGrid_ItemUpdated" OnItemInserted="NotesGrid_ItemInserted"
                                        CellSpacing="0" GridLines="None" DataSourceID="odsNotes">
                                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                        <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="NotesId"
                                            AutoGenerateColumns="False" DataSourceID="odsNotes">
                                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                            </RowIndicatorColumn>
                                            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                            </ExpandCollapseColumn>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="NoteText" FilterControlAltText="Filter Note column" HeaderStyle-Width="700px"
                                                    HeaderText="Note" SortExpression="NoteText" UniqueName="NoteText" ItemStyle-HorizontalAlign="Left">
                                                </telerik:GridBoundColumn>
                                               <telerik:GridBoundColumn DataField="CreatedBy" FilterControlAltText="Filter Created By column"
                                                    HeaderText="Created By" SortExpression="CreatedBy" UniqueName="CreatedBy" ItemStyle-HorizontalAlign="Left">
                                                </telerik:GridBoundColumn>
                                               <telerik:GridBoundColumn DataField="CreatedOn" FilterControlAltText="Filter Created Date column"
                                                    HeaderText="Created Date" SortExpression="CreatedOn" UniqueName="CreatedOn" ItemStyle-HorizontalAlign="Left">
                                                </telerik:GridBoundColumn>
                                               <telerik:GridBoundColumn DataField="ModifiedBy" FilterControlAltText="Filter Modified By column"
                                                    HeaderText="Modified By" SortExpression="ModifiedBy" UniqueName="ModifiedBy" ItemStyle-HorizontalAlign="Left">
                                                </telerik:GridBoundColumn>
                                               <telerik:GridBoundColumn DataField="ModifiedOn" FilterControlAltText="Filter Modified Date column"
                                                    HeaderText="Modified Date" SortExpression="ModifiedOn" UniqueName="ModifiedOn" ItemStyle-HorizontalAlign="Left">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <EditFormSettings EditFormType="Template">
                                                <FormTemplate>
                                                <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("NoteText") %>' Rows="4" Width="800px">
                                                </asp:TextBox>
                                                </FormTemplate>
                                            </EditFormSettings>
                                            <CommandItemTemplate>
                                                <div style="padding: 5px 5px;">
                                                    <asp:LinkButton ID="btnEditNoteSelected" runat="server" CommandName="EditSelected" Visible='<%# NotesGrid.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Edit.gif"/>Edit selected</asp:LinkButton>&nbsp;&nbsp;
                                                    <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# NotesGrid.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Update.gif"/>Update</asp:LinkButton>&nbsp;&nbsp;
                                                    <asp:LinkButton ID="btnNoteCancel" runat="server" CommandName="CancelAll" Visible='<%# NotesGrid.EditIndexes.Count > 0 || NotesGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Cancel.gif"/>Cancel editing</asp:LinkButton>&nbsp;&nbsp;
                                                    <asp:LinkButton ID="btnInsertNote" runat="server" CommandName="InitInsert" Visible='<%# !NotesGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/AddRecord.gif"/>Add new</asp:LinkButton>&nbsp;&nbsp;
                                                    <asp:LinkButton ID="btnSaveInsert" runat="server" CommandName="PerformInsert" Visible='<%# NotesGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Insert.gif"/> Save</asp:LinkButton>&nbsp;&nbsp;
                                                    <asp:LinkButton ID="btnDeleteNote" OnClientClick="javascript:return confirm('Delete selected Asset Type?')"
                                                       runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Delete.gif"/>Delete selected</asp:LinkButton>&nbsp;&nbsp;
                                                </div>
                                            </CommandItemTemplate>
                                        </MasterTableView>
                                        <ClientSettings>
                                            <Selecting AllowRowSelect="True"></Selecting>
                                            <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True"
                                                SaveScrollPosition="True" />
                                        </ClientSettings>
                                        <FilterMenu EnableImageSprites="False">
                                        </FilterMenu>
                                    </telerik:RadGrid>
                                    <asp:ObjectDataSource ID="odsNotes" runat="server" TypeName="AssetVue.BLL.Entities.Note"
                                        DataObjectTypeName="AssetVue.BLL.Entities.Note" SelectMethod="getAllNotes"
                                        InsertMethod="addNote" UpdateMethod="updateNote" DeleteMethod="deleteNote" 
                                        OnInserting="odsNotes_Inserting" OnSelecting="odsNotes_Selecting">
                                        <SelectParameters>
                                            <asp:Parameter Name="parentId" Type="String" />
                                        </SelectParameters>
                                        <InsertParameters>
                                            <asp:Parameter Name="parentId" Type="String" />
                                            <asp:Parameter Name="parentType" Type="String" />
                                        </InsertParameters>
                                   </asp:ObjectDataSource>
                                </p>
                            </fieldset>
                        </div>
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 03 Apr 2013 Link to this post

    Hello Steven,

    The described issue is rather strange and form the RadGrid declaration only it is rather difficult to determine what exactly is causing the problem. Could you please elaborate a bit on the exact ajax settings you are adding. Also does the RadGrid control also ajaxified? It will be best of you could open a regular support ticket and send us isolated runnable application which demonstrates the described issue. Thus we will be able to debug it locally and do our best to provide proper solution for your specific case.

    Greetings,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top