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

[Solved] Update failed with ajax

2 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 31 Oct 2009, 01:35 PM
hi

I am able to do an update without ajax. but when i use proxy manager for ajax, the update failed. I am using IE8

         <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sdsLabTest"   
                    GridLines="None" Skin="Outlook" AllowAutomaticDeletes="True"   
                    AllowAutomaticInserts="True" AllowAutomaticUpdates="True"   
                    AutoGenerateColumns="False">  
<MasterTableView datakeynames="Test_Code" datasourceid="sdsTest" EditFormSettings-PopUpSettings-Width="550px" CommandItemDisplay="Top"   
                        EditMode="PopUp">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
 
 
 <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManagerProxy> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="Test_Code" DataType="System.Int32"   
            HeaderText="Code" ReadOnly="True" SortExpression="Test_Code"   
            UniqueName="Test_Code">  
        </telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn DataField="Test_Name" HeaderText="Package Name"   
            SortExpression="Test_Name" UniqueName="Test_Name">  
            <EditItemTemplate> 
                <asp:TextBox ID="Test_NameTextBox" Width="250px" runat="server"   
                    Text='<%# Bind("Test_Name") %>'></asp:TextBox> 
            </EditItemTemplate> 
            <ItemTemplate> 
                <asp:Label ID="Test_NameLabel" runat="server"   
                    Text='<%# Eval("Test_Name") %>'></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn DataField="Test_Description"   
            HeaderText="Items Description" SortExpression="Test_Description"   
            UniqueName="Test_Description">  
            <EditItemTemplate> 
                <FCKeditorV2:FCKeditor ID="FCKeditor1"  ToolbarSet="Basic" Width="400px" Height="150px" value='<%# Bind("Test_Description") %>' runat="server" BasePath="~/fckeditor/">  
                </FCKeditorV2:FCKeditor> 
            </EditItemTemplate> 
            <ItemTemplate> 
                <asp:Label ID="Test_DescriptionLabel" runat="server"   
                    Text='<%# Eval("Test_Description") %>'></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn DataField="Test_Price" DataType="System.Decimal"   
            HeaderText="Price S$" SortExpression="Test_Price" UniqueName="Test_Price">  
            <EditItemTemplate> 
                S$<asp:TextBox ID="Test_PriceTextBox" runat="server"   
                    Text='<%# Bind("Test_Price") %>'></asp:TextBox> 
            </EditItemTemplate> 
            <ItemTemplate> 
                <asp:Label ID="Test_PriceLabel" runat="server"   
                    Text='<%# Eval("Test_Price") %>'></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridButtonColumn CommandName="Delete" HeaderText="Delete"   
            Text="Delete" UniqueName="column">  
        </telerik:GridButtonColumn> 
        <telerik:GridEditCommandColumn HeaderText="Edit">  
        </telerik:GridEditCommandColumn> 
      </Columns> 
 
<EditFormSettings> 
<PopUpSettings Width="550px"></PopUpSettings> 
</EditFormSettings> 
</MasterTableView> 
                </telerik:RadGrid> 

I did an update without using ajax and it was working fine. The moment i ajax it, it gave me an error. How do i solve this? Thanks

2 Answers, 1 is accepted

Sort by
0
L
Top achievements
Rank 1
answered on 31 Oct 2009, 01:56 PM
hi

Ok, i have tested with ajax on a normal textbox with multiline on the Test_Description binding and it works fine, and that is because it does not generate html code.

But when i use the FCKEditor, the update failed with ajax and i have checked that it was because the html code that was generated from FCKEdtitor.

Hmm, how do i overcome this? Thanks
0
L
Top achievements
Rank 1
answered on 01 Nov 2009, 02:44 AM
hi

managed to solve this using

<

 

pages validateRequest="false">

 



thanks
Tags
Grid
Asked by
L
Top achievements
Rank 1
Answers by
L
Top achievements
Rank 1
Share this question
or