Deleting multiple tables using delete button in radgrid

2 posts, 0 answers
  1. Abdul Kadar
    Abdul Kadar avatar
    35 posts
    Member since:
    Oct 2008

    Posted 16 Oct 2008 Link to this post

    I kept a delete button to delete a row in the grid.I need to delete 2 tables when i click a particular row delete.For ex. , I click the categoryid 4, to delete, it needs to delete the category master table with the category id no 4 and also the category master table with category id no 4.Pls suggest me asap.

    thanks & regards    



    telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource3"



    GridLines="None" Style="left: 24px; position: absolute; top: 168px" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" Height="24px" PageSize="5" Skin="Sunset" Width="512px" AllowAutomaticUpdates="True" AutoGenerateEditColumn="True" AllowAutomaticDeletes="True">




    <MasterTableView DataKeyNames="categoryid" DataSourceID="SqlDataSource3" EditMode="InPlace">







    <telerik:GridBoundColumn DataField="categoryid" DataType="System.Int64" EmptyDataText="&amp;nbsp;"



    HeaderText="Category ID" SortExpression="categoryid" UniqueName="categoryid" ReadOnly="True">






    <telerik:GridBoundColumn DataField="categorydescription" EmptyDataText="&amp;nbsp;"



    HeaderText="Category Description" SortExpression="categorydescription" UniqueName="categorydescription">






    <telerik:GridClientDeleteColumn ConfirmText="Are you sure to delete the selected row?" ButtonType="ImageButton" ImageUrl="~/images/Delete.gif" Text="Delete" UniqueName="column" >



    <HeaderStyle Width="35px" />












    <HeaderStyle Width="20px" />









    <HeaderStyle Width="20px" />









    <FilterMenu EnableTheming="True" Skin="Sunset">



    <CollapseAnimation Duration="200" Type="OutQuint" />






    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"



    Font-Underline="False" Wrap="True" />



    <PagerStyle Mode="NextPrevAndNumeric" />






    <Selecting AllowRowSelect="True" />






    <EditItemStyle Font-Names="Tahoma" Font-Size="9pt" />





  2. Prangadj
    Prangadj avatar
    174 posts
    Member since:
    Jan 2008

    Posted 20 Oct 2008 Link to this post

    Abdul, I am confused by your post as your explanation is that you want to delete one and the same row from source table. Try the same with auto deletes and GridView, the same will probably work with Telerik grid.

    If you have in mind grid hierarchy and chain deletes, I found this topic in the help.

  3. DevCraft R3 2016 release webinar banner
Back to Top