我有2个数据源想要放入2个不同的列中,如何将2个数据源添加到2个不同的列中?
List<string> credits = new List<string>();
List<string> status = new List<string>();
/missing code shitty limits
foreach(DataRow dataRow in dt.Rows) //Checks the server if it is running or not.
{
string value = dataRow.Field<string>("Slave_IO_Running"); //Looks for "Slave_IO_Running" status.
if (value == "Yes")
{
status.Add(Name + ": Working");
credits.Add(credentials);
}
else
{
status.Add(Name + ": Replication ERR");
}
break;
}
GridView1.DataSource = credits;
GridView1.DataSource = status;
GridView1.DataBind();