void clear() { GridUniqeGstin.DataSource = null; GridUniqeGstin.DataBind(); GridGroupFilter.DataSource = null; GridGroupFilter.DataBind(); grdGSTR2AData.DataSource = null; grdGSTR2AData.DataBind(); ViewState["AllData"] = null; PnlAlldata.Visible = false; }
protected void GridGroupFilter_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "GSTINDetail") { pnlUniqe.Visible = true; string gstin = e.CommandArgument.ToString(); DataTable tblFiltered = new DataTable(); DataTable dtall = new DataTable(); dtall = (DataTable)ViewState["AllData"]; tblFiltered = dtall.AsEnumerable().Where(r => r.Field <string>("PurchGSTIN") == gstin) .CopyToDataTable(); // Filter(unique) group Zone wise GridUniqeGstin.DataSource = tblFiltered; GridUniqeGstin.DataBind(); } }