Hi,
I have a webhierarchicaldatagrid with parent rows and child rows. In child grid I have added a template column containing a link button. On click of that link button I want to show/hide another grid. Can someone please tell me how to find a button control inside child grid and do a postback on that on client side.
Thanks,
Megha
Hello Megha,
You could handle ItemCommand event:
protected void WebHierarchicalDataGrid1_ItemCommand(object sender, Infragistics.Web.UI.GridControls.HandleCommandEventArgs e)
{
if (e.CommandName == "HideGrid")
//Command Argument return clicked row id
if (e.CommandArgument == "0")
//hide grid 1
}
else
//hide grid 2
…
<ig:TemplateDataField Key="TemplateField_0">
<Header Text="TemplateField_0" />
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="HideGrid" CommandArgument=<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).Item, "Row.Index") %>>Hide</asp:LinkButton>
</ItemTemplate>
</ig:TemplateDataField>