/// <summary> /// Close sheets /// </summary> private void closeAllSubSheets() { for (int i = 0; i < this.lvWasteTransferActivity.Items.Count; i++) { ucTsWasteTransfersSheet control = (ucTsWasteTransfersSheet)this.lvWasteTransferActivity.Items[i].FindControl("ucTsWasteTransfersSheet"); if (control != null) { control.Visible = false; } } }
private void toggleTimeseries(ListViewCommandEventArgs e, int rowindex) { ucTsWasteTransfersSheet control = (ucTsWasteTransfersSheet)this.lvWasteTransferActivity.Items[rowindex].FindControl("ucTsWasteTransfersSheet"); closeAllSubSheets(); // only allow 1 sheet open control.Visible = !control.Visible; Control div = this.lvWasteTransferActivity.Items[rowindex].FindControl("subsheet"); div.Visible = !div.Visible; if (control.Visible) { // create search filter and change activity filter WasteTransferTimeSeriesFilter filter = FilterConverter.ConvertToWasteTransferTimeSeriesFilter(SearchFilter); filter.ActivityFilter = getActivityFilter(e); control.Populate(filter, SearchFilter.YearFilter.Year); } }