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

[Solved] Automatic Update with Ajax doesn't work

2 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jiří
Top achievements
Rank 1
Jiří asked on 17 Nov 2009, 02:09 PM
Hello,

I have a RadGrid with a simple definition, automaticinsert and update allowed:
<telerik:RadGrid ID="MainGrid" runat="server" SkinID="Admin" AllowPaging="True" AllowAutomaticInserts="True" 
  AllowAutomaticUpdates="True" DataSourceID="ObjectDataSourceMain"
  <MasterTableView DataKeyNames="Id"
    <Columns> 
      <telerik:GridBoundColumn HeaderText="Název katalogu" DataField="Name"
      </telerik:GridBoundColumn> 
      <telerik:GridBoundColumn HeaderText="Rok" DataField="Year"
      </telerik:GridBoundColumn> 
      <telerik:GridCheckBoxColumn HeaderText="Aktivní" DataField="IsActive"
      </telerik:GridCheckBoxColumn> 
    </Columns> 
  </MasterTableView> 
</telerik:RadGrid> 
<asp:ObjectDataSource ID="ObjectDataSourceMain" runat="server" OldValuesParameterFormatString="Original_{0}" 
  SelectMethod="GetCatalogs" UpdateMethod="UpdateCatalog" InsertMethod="CreateCatalog" 
  TypeName="Kooperativa.KoopObchod.Facade.ProductFacade"
  <UpdateParameters> 
  </UpdateParameters> 
  <InsertParameters> 
  </InsertParameters> 
</asp:ObjectDataSource> 

Everything works fine till RadAjaxManager is added:
<telerik:RadScriptManager ID="RadScriptManager" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
  <AjaxSettings> 
    <telerik:AjaxSetting AjaxControlID="MainGrid"
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="MainGrid" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
  </AjaxSettings> 
</telerik:RadAjaxManager> 

Then I get client error:

"Line: 6
Error: Sys.WebForms.PageRequestManagerServerErrorException: Exception has been thrown by the target of an invocation."

Insert works fine. This problem occured on all my grids.

How to find the problem? Thank you

2 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 19 Nov 2009, 05:16 PM
Hello Jiří,

Can you give us some more details on this scenario. Is there another message to the exception you are getting? Are you positive that updates work without AJAX ?

Greetings,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jiří
Top achievements
Rank 1
answered on 09 Dec 2009, 11:35 AM
Seems that it was caused by accidentally inserted text "web" before <%@ Master ... in a masterpage. It caused another problems, e.g. with filtering combobox. After removing this text it started to work properly.

Jiri Nouza

Tags
Grid
Asked by
Jiří
Top achievements
Rank 1
Answers by
Veli
Telerik team
Jiří
Top achievements
Rank 1
Share this question
or