Grid Update Not Working

4 posts, 0 answers
  1. Jim
    Jim avatar
    8 posts
    Member since:
    Sep 2010

    Posted 11 Apr 2011 Link to this post


    Can someone please tell me why my datasource is not updating when using the RadGrid?  I have read countless forum posts and still have been unable to solve the issue.  I wanted to use the AutomaticUpdate/Delete feature, because it appeared to be "simple".  I am using the grid to display a user's shopping cart contents.  All I want to be able to do is allow them to update the quantity of an item in the cart, or remove it....period.

    Below is my code.  I have stripped it down to bare bones in hopes to find the problem, but still no luck.  This is driving me NUTS!

    Any help would be greatly appreciated.


    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="shoppingcart.ascx.vb" Inherits="ctl_shoppingcart" %>
    <%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
        Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
    <%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <script type="text/javascript">
        function showSubDetail(URL) {
            var oWnd = radopen(URL, "windowItemDetail");
    <div class="shoppingcart">
        <div class="heading">
            Current Items in Your Cart
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" EnableAJAX="true" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="lineID" DataSourceID="SqlDataSource1" EditMode="InPlace">
                    <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="editcolumn"></telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="quoteID" DataType="System.Int32" HeaderText="quoteID"
                    <telerik:GridBoundColumn DataField="lineID" HeaderText="lineID" UniqueName="lineID"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="enteredByContactID" HeaderText="enteredByContactID" UniqueName="enteredByContactID"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="containersOrdered" HeaderText="containersOrdered" UniqueName="containersOrdered"></telerik:GridBoundColumn>
        <br /><br />
        <telerik:RadButton ID="btnCheckout" Text="Checkout" runat="server">
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                <telerik:RadWindow ID="windowItemDetail" CssClass="itemDetailWindow" 
                Modal="true" Behaviors="Close"
                Animation="Fade" AnimationDuration="500"
                Title="Assorted Species Tray Detail"
                VisibleTitlebar="true" VisibleStatusbar="false">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:RakerDBConnectionString %>"
            SelectCommand="spSelectQuoteDetailInfoByQuoteID" SelectCommandType="StoredProcedure"
            UpdateCommand="spUpdateQuoteDetailLineByCriteria" UpdateCommandType="StoredProcedure">
                <asp:Parameter Name="quoteID" Type="Int32" DefaultValue="1229" />
                <asp:Parameter Name="quoteID" Type="Int32" />
                <asp:Parameter Name="lineID" Type="Int32" />
                <asp:Parameter Name="containersOrdered" Type="Int32" />
                <asp:Parameter Name="enteredByContactID" Type="Int32" />


    Imports System.Data
    Imports Telerik.Web.UI
    Partial Class ctl_shoppingcart
        Inherits System.Web.UI.UserControl
    End Class
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Apr 2011 Link to this post

    Hello Jim,

    Please take a look at the following Code Library which shows how to perform Automatic opeartions using SqldataSource control.
    Automatic operations with SqlDataSource control

    Hope this helps,
  3. Jim
    Jim avatar
    8 posts
    Member since:
    Sep 2010

    Posted 13 Apr 2011 Link to this post

    Hello Princy,

    Thank you for your help on this.  I discovered (with the help of my friends at Falafel Software...thanks Basem!) that the problem I was experiencing is a bug with Sitefinity 4.0.  Apparently, AJAX is broken with the RadGrid in Sitefinity 4.0.  Hoping for a fix today with the release of Sitefinity 4.1....right Telerik?

    Thanks for trying,
  4. Georgi
    Georgi avatar
    31 posts

    Posted 18 Apr 2011 Link to this post

    Hello Jim,

    Right. This is going to be fixed with the 4.1 release.

    the Telerik team

Back to Top