DataTable dtCmb = new DataTable();
dtCmb.Columns.Add("Id");
dtCmb.Columns.Add("Value", typeof(double));
for (int iRw = 0; iRw < dtGrid.Rows.Count; iRw++)
{
DataRow dr = dtCmb.NewRow();
dr["Id"] = "1";
dr["Value"] = dtGrid.Rows[iRw]["Capacity"];
dtCmb.Rows.Add(dr);
}
dtCmb.Select("", "Value ASC");
flagComboboxFRL = true;
cmbMDDL.DataSource = dtCmb;
cmbMDDL.ValueMember = "Id";
cmbMDDL.DisplayMember = "Value";
cmbMDDL.Text = Convert.ToString(dtCmb.Rows[0]["Value"]);
cmbFRL.DataSource = dtCmb.Copy();
cmbFRL.ValueMember = "Id";
cmbFRL.DisplayMember = "Value";
cmbFRL.Text = Convert.ToString(dtCmb.Rows[dtCmb.Rows.Count - 1]["Value"]);
dtCmb.Columns.Add("Id");
dtCmb.Columns.Add("Value", typeof(double));
for (int iRw = 0; iRw < dtGrid.Rows.Count; iRw++)
{
DataRow dr = dtCmb.NewRow();
dr["Id"] = "1";
dr["Value"] = dtGrid.Rows[iRw]["Capacity"];
dtCmb.Rows.Add(dr);
}
dtCmb.Select("", "Value ASC");
flagComboboxFRL = true;
cmbMDDL.DataSource = dtCmb;
cmbMDDL.ValueMember = "Id";
cmbMDDL.DisplayMember = "Value";
cmbMDDL.Text = Convert.ToString(dtCmb.Rows[0]["Value"]);
cmbFRL.DataSource = dtCmb.Copy();
cmbFRL.ValueMember = "Id";
cmbFRL.DisplayMember = "Value";
cmbFRL.Text = Convert.ToString(dtCmb.Rows[dtCmb.Rows.Count - 1]["Value"]);