private void UpdateDataView() { if (ddlGroups.SelectedIndex > 0) { panelExplain.Visible = false; dg.Visible = true; using (inputForm = InputForm.GetByKey(inputFormId)) { //ContainerList cl = Container.GetAll("GroupId = " + ddlGroups.SelectedValue); using (ContainerList cl = inputForm.GetCandidates(Convert.ToInt32(ddlGroups.SelectedValue))) { cl.Sort("Tag"); dg.DataSource = cl; dg.DataBind(); Utils.InitGridSort(ref dg, false); dg.DisplayLayout.Pager.AllowPaging = false; dg.DisplayLayout.AllowSortingDefault = Infragistics.WebUI.UltraWebGrid.AllowSorting.No; lbNbContainers.Text = " (#" + cl.Count.ToString() + " containers with [" + inputForm.InputFormTypeCode + "] type)"; } if (ifcl != null) { ifcl.Dispose(); } } } else { dg.Visible = false; panelExplain.Visible = true; } }