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

Deleting multiple tables using delete button in radgrid

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Abdul Kadar
Top achievements
Rank 1
Abdul Kadar asked on 16 Oct 2008, 04:39 PM
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">

 

 

<Columns>

 

 

 

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

 

 

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

 

 

</telerik:GridBoundColumn>

 

 

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

 

 

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

 

 

</telerik:GridBoundColumn>

 

 

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

 

 

<HeaderStyle Width="35px" />

 

 

</telerik:GridClientDeleteColumn>

 

 

</Columns>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

</MasterTableView>

 

 

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

 

 

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

 

 

</FilterMenu>

 

 

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

 

 

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

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

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

 

 

</telerik:RadGrid>

 


1 Answer, 1 is accepted

Sort by
0
Prangadj
Top achievements
Rank 1
answered on 20 Oct 2008, 11:05 AM
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.

Prangadj
Tags
Grid
Asked by
Abdul Kadar
Top achievements
Rank 1
Answers by
Prangadj
Top achievements
Rank 1
Share this question
or