void seTFlx()
{
DataGridViewTextBoxColumn cS = new DataGridViewTextBoxColumn();
DataGridViewComboBoxColumn cBc = new DataGridViewComboBoxColumn();
DataGridViewComboBoxColumn cBc1 = new DataGridViewComboBoxColumn();
cS.HeaderText = "S.No";
cBc.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
p1.cmd = new OleDbCommand("select pname from pmaster", p1.Cn);
p1.rs = p1.cmd.ExecuteReader();
while (p1.rs.Read())
{
cBc.Items.Add(p1.rs[0]);
cBc1.Items.Add(p1.rs[0]);
}
DGV.Columns.Add(cS);
DGV.Columns.Add(cBc);
DGV.Columns.Add(cBc1);
DGV.Rows.Add(100);
for (int s = 0; s < 100; s++)
{
DGV[0, s].Value = s + 1;
}
DGV.Columns[0].ReadOnly = true;
}
{
DataGridViewTextBoxColumn cS = new DataGridViewTextBoxColumn();
DataGridViewComboBoxColumn cBc = new DataGridViewComboBoxColumn();
DataGridViewComboBoxColumn cBc1 = new DataGridViewComboBoxColumn();
cS.HeaderText = "S.No";
cBc.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
p1.cmd = new OleDbCommand("select pname from pmaster", p1.Cn);
p1.rs = p1.cmd.ExecuteReader();
while (p1.rs.Read())
{
cBc.Items.Add(p1.rs[0]);
cBc1.Items.Add(p1.rs[0]);
}
DGV.Columns.Add(cS);
DGV.Columns.Add(cBc);
DGV.Columns.Add(cBc1);
DGV.Rows.Add(100);
for (int s = 0; s < 100; s++)
{
DGV[0, s].Value = s + 1;
}
DGV.Columns[0].ReadOnly = true;
}
No comments:
Post a Comment