我有兩個靜態列表,是有兩個按鈕字段一起綁定到一個DataGridView
。我只能綁定一個列表和一個按鈕字段。是否有可能不止一個列表綁定到DataGridView
?綁定多個列表到一個DataGridView
ServiceController objSAVAdminService = new ServiceController("SAVAdminService");
ServiceController objSAVService = new ServiceController("SAVService");
ServiceController objPPVService = new ServiceController("PPVService");
ServiceController objMLLService = new ServiceController("MLLService");
List<string> ServiceName = new List<string>();
List<string> ServiceStatus = new List<string>();
ServiceName.Add(objSAVService.ServiceName.ToString());
ServiceName.Add(objSAVAdminService.ServiceName.ToString());
ServiceName.Add(objPPVService.ServiceName.ToString());
ServiceName.Add(objMLLService.ServiceName.ToString());
ServiceStatus.Add(objSAVService.Status.ToString());
ServiceStatus.Add(objSAVAdminService.Status.ToString());
ServiceStatus.Add(objPPVService.Status.ToString());
ServiceStatus.Add(objMLLService.Status.ToString());
我需要這兩個列表的DataGridView
以及兩個按鈕結合每行啓動或停止相應的服務。