private void GridDesign()
{
dgvDescription.Columns.Add("dno", "DNO");
dgvDescription.Columns.Add("sno", "SNO");
dgvDescription.Columns.Add("description", "Description");
dgvDescription.Columns.Add("size", "Size");
dgvDescription.Columns.Add("materialname", "Material Name");
dgvDescription.Columns.Add("colorprinting", "No of Color Printing");
dgvDescription.Columns.Add("mode", "Mode");
dgvDescription.Columns.Add("qty", "Quantity");
dgvDescription.Columns.Add("quom", "UOM");
dgvDescription.Columns.Add("weight", "Weight");
dgvDescription.Columns.Add("wuom", "UOM");
dgvDescription.Columns.Add("rate", "Rate");
dgvDescription.Columns.Add("amount", "Amount");
dgvDescription.Columns.Add("option", "Option");
dgvDescription.Columns[0].Width = 100;
dgvDescription.Columns[1].Width = 100;
dgvDescription.Columns[2].Width = 200;
dgvDescription.Columns[3].Width = 100;
dgvDescription.Columns[4].Width = 100;
dgvDescription.Columns[5].Width = 100;
dgvDescription.Columns[6].Width = 85;
dgvDescription.Columns[7].Width = 50;
dgvDescription.Columns[8].Width = 85;
dgvDescription.Columns[9].Width = 50;
dgvDescription.Columns[10].Width = 85;
dgvDescription.Columns[11].Width = 100;
dgvDescription.Columns[12].Width = 100;
comboQuom.SelectedIndex = 0;
comboWuom.SelectedIndex = 0;
this.dgvDescription.Columns["DNO"].Visible = false;
this.dgvDescription.Columns["SNO"].Visible = false;
this.dgvDescription.Columns["Option"].Visible = false;
this.dgvDescription.Columns["qty"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
this.dgvDescription.Columns["weight"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
this.dgvDescription.Columns["rate"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
this.dgvDescription.Columns["amount"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
dgvDeletedescription.Columns.Add("sno", "SNO");
dgvDeletedescription.Columns.Add("sid", "SID");
dgvDeletedescription.Columns[0].Width = 100;
dgvDeletedescription.Columns[0].Width = 100;
}
Output:
and Finally call a load function
No comments:
Post a Comment