Grid Databinding confudes

2 posts, 1 answers
  1. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 29 Apr 2009 Link to this post

    Dear Support and comunnity,

    I'm really confused. I try to bind a grid in a very simple and codeless way.
    The db is an access mdb with one table for testing,

    It doesn't matter what I'm doing, Edit, delete, insert or refresh, because I add an item manuely, nothing
    happends right no. No action ist execute.

    Can someone tell me why. Hope its not to simple ;-)

    Here ist the link to the demo VSO 2008 project:


    Thanks a lot.
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Apr 2009 Link to this post

    Hi Christian,

    I have checked your code and found that you have not set  AllowAutomaticUpdatesAllowAutomaticDeletes and AllowAutomaticInserts property of the RadGrid to true. Set it to true to perform the automatic operations.

    <telerik:RadGrid ID="RadGrid1"  AllowAutomaticUpdates="true"  AllowAutomaticDeletes="true" AllowAutomaticInserts ="true"    AllowMultiRowSelection="true"   DataSourceID="AccessDataSource1" runat="server" > 

    Also here is the modified code which worked on my end.

    <asp:AccessDataSource ID="AccessDataSource1" runat="server"  
                DeleteCommand="DELETE FROM [Test] WHERE [ID] = @ID"  
                InsertCommand="INSERT INTO [Test] ([Titel], [Prio], [Date]) VALUES (@Titel,@Prio, @Date)"  
                SelectCommand="SELECT [ID], [Titel], [Prio], [Date] FROM [Test]"  
                UpdateCommand="UPDATE [Test] SET [Titel] = @Titel, [Prio] = @Prio, [Date] = @Date WHERE [ID] = @ID"
                    <asp arameter Name="ID" Type="Int32" /> 
                    <asp arameter Name="Titel" Type="String" /> 
                    <asp arameter Name="Prio" Type="String" /> 
                    <asp arameter Name="Date" Type="DateTime" /> 
                    <asp arameter Name="ID" Type="Int32" /> 
                    <asp arameter Name="ID" Type="Int32" /> 
                    <asp arameter Name="Titel" Type="String" /> 
                    <asp arameter Name="Prio" Type="String" /> 
                    <asp arameter Name="Date" Type="DateTime" /> 

    Hope this helps..

  3. DevCraft R3 2016 release webinar banner
Back to Top