I have a RadGrid that contains a GridTableView in the DetailTables, as such:
...
So, the above button, "RemoveRelatedProductButton" shows up allright, but whenever I press it - nothing happens.
I have this in the code behind:
_relatedProductsGrid = FindControl("RelatedProductsGrid") as RadGrid;
_relatedProductsGrid.ItemCommand += RelatedProductsGrid_ItemCommand;
And finally:
protected void RelatedProductsGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName == "Delete")
etc.
However, this method never fires. What do I need to do?
<telerik:RadGrid ID="RelatedProductsGrid" runat="server" Width="95%" ShowStatusBar="true" AutoGenerateColumns="False" PageSize="20" AllowSorting="False" AllowMultiRowSelection="False" AllowPaging="True"> <pagerstyle mode="NextPrevAndNumeric"></pagerstyle> <mastertableview width="100%" datakeynames="PartId" allowmulticolumnsorting="False"> <DetailTables> <telerik:GridTableView DataKeyNames="PartId" Name="RelatedProducts" Width="100%"> <Columns>...
<telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"> <ItemTemplate> <telerik:RadButton ID="RemoveRelatedProductButton" runat="server" CommandName="Delete"> </telerik:RadButton> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </telerik:GridTableView> </DetailTables>So, the above button, "RemoveRelatedProductButton" shows up allright, but whenever I press it - nothing happens.
I have this in the code behind:
_relatedProductsGrid = FindControl("RelatedProductsGrid") as RadGrid;
_relatedProductsGrid.ItemCommand += RelatedProductsGrid_ItemCommand;
And finally:
protected void RelatedProductsGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName == "Delete")
etc.
However, this method never fires. What do I need to do?