This code is working fine finally...
<script type="text/javascript">
$(function () {
$("[src*=minus]").each(function () {
$(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>");
$(this).next().remove()
});
});
</script>
<pre> <asp:ImageButton ID="imgShow" runat="server" OnClick="Show_Hide_ChildGrid" ImageUrl="~/Images/plus.png" CommandArgument="Show" />
protected void Show_Hide_ChildGrid(object sender, EventArgs e)
{
SqlDataReader objSqlDataReader = null;
try
{
ImageButton imgShowHide = (sender as ImageButton);
GridViewRow row = (imgShowHide.NamingContainer as GridViewRow);
if (imgShowHide.CommandArgument == "Show")
{
row.FindControl("pnlLifts").Visible = true;
imgShowHide.CommandArgument = "Hide";
imgShowHide.ImageUrl = "~/Images/minus.png";
}
else
{
row.FindControl("PanelID").Visible = false;
imgShowHide.CommandArgument = "Show";
imgShowHide.ImageUrl = "~/Images/plus.png";
}
}