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

RadGrid - Update Panel Problem

1 Answer 834 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 07 Jul 2011, 06:59 AM

<this is fixed. See my 2nd post>

I am having my first go at doing a grid with the Web User Control used for editing each row.

I got the grid basically working to the point where if I click Edit on any row, that grid opens and shows the edit form. Then if I click Cancel the edit form disappears.

This part was working fine however each time I clicked Edit or Cancel the grid would  visibly blank for a second as it was reloaded.  The solution of course is it put it in an UpdatePanel. It is there my problem started.

Here is my grid with the UpdatePanel around it.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
           <ContentTemplate>
           <telerik:RadGrid ID="rgContacts" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid"
               AllowSorting="False" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="rgContacts_PreRender"
               OnNeedDataSource="rgContacts_NeedDataSource" OnUpdateCommand="rgContacts_UpdateCommand"
               OnInsertCommand="rgContacts_InsertCommand" OnDeleteCommand="rgContacts_DeleteCommand">
               <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="con_Contact_ID">
                   <Columns>
                       <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />
                       
                       <telerik:GridBoundColumn UniqueName="con_Firstname" HeaderText="First Name" DataField="con_Firstname" />
                       <telerik:GridBoundColumn UniqueName="con_Surname" HeaderText="Surname" DataField="con_Surname" />
                       <telerik:GridBoundColumn UniqueName="con_Position" HeaderText="Position" DataField="con_Position" />
                       <telerik:GridBoundColumn UniqueName="con_Email" HeaderText="Email" DataField="con_Email" />
                       <telerik:GridBoundColumn UniqueName="con_Phone" HeaderText="Landline" DataField="con_Phone" />
                       <telerik:GridBoundColumn UniqueName="con_Mobile" HeaderText="Mobile" DataField="con_Mobile" />
                       <telerik:GridBoundColumn UniqueName="con_Fax" HeaderText="Fax" DataField="con_Fax" />
                       <telerik:GridBoundColumn UniqueName="con_Is_Primary" HeaderText="Is Primary Contact" DataField="con_Is_Primary" />
                       <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" />
                   </Columns>
                   <EditFormSettings UserControlName="Controls/ContactDetails.ascx" EditFormType="WebUserControl">
                       <EditColumn UniqueName="EditCommandColumn1">
                       </EditColumn>
                   </EditFormSettings>
               </MasterTableView>
               <ClientSettings>
                   <ClientEvents OnRowDblClick="RowDblClick" />
               </ClientSettings>
           </telerik:RadGrid>
          </ContentTemplate>
       </asp:UpdatePanel>

Pretty basic stuff.

However, if I now click the Edit link on any row the grid acts just as it did before (where it blank for a split second as it refreshes), except that now I have some strange text above and below it.

It looks like the attached image

I'm not sure if this is a RadGrid problem or a problem with my UpdatePanel (or ajax toolkit dll).. None the less, anyone have a clue what it going on here?










1 Answer, 1 is accepted

Sort by
0
Brad
Top achievements
Rank 1
answered on 07 Jul 2011, 07:51 AM
Ok, I got this sussed

I had this script manager in the page.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

With and without the standard update panel it did not work. .

I removed the Update panel and the RadScriptManger above and added the asp:ScriptManager below.

(Note the RadAjaxManager was always on the page, I just neglected to show it in my first post. )

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgContacts">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgContacts" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
         
           <asp:ScriptManager ID="ScriptManager1" runat="server">
         </asp:ScriptManager>
         
  
 
            <telerik:RadGrid ID="rgContacts" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid" . . .


Problem sorted.. Not sure why the RadScriptManager does not work with the RadAjaxManager. But the page is working now and that'll do.
Tags
General Discussions
Asked by
Brad
Top achievements
Rank 1
Answers by
Brad
Top achievements
Rank 1
Share this question
or