void ShowData() { LV.Where("GroupID=" + (LB.SelectedValue == null ? "0" : LB.SelectedValue)); LV.ShowData(true); table = LV.DataTable; ToAdd(); LV.Focus(); }
void DefineView() { LV = new MyListViewA(listView1); LV.SetDB(Global.con, "Labels"); LV.ColumnWidths = new int[] { 0, 0, 0, 230, 65 };//列宽(默认80) LV.RowHeight = 30; LV.RowColor = Color.LightGray; LV.SetStyle("Cambria", 16, FontStyle.Bold); LV.QueryFields = "LabelID,GroupID,Path,LabelName as 标签名,LabelOrder as 序号"; LV.Where("GroupID=" + GroupID); LV.OrderBy("LabelOrder"); ShowData(); }