Ejemplo n.º 1
0
        private void btnExpValFormat_Click(object sender, EventArgs e)
        {
            txtbxExpression.Hide();
            btnClearAll.Height     = INTERFACEOBJECTSHEIGHT;
            btnAddRowColumn.Height = INTERFACEOBJECTSHEIGHT;
            btnExpValFormat.Height = INTERFACEOBJECTSHEIGHT;

            if (FOD == FormatOfData.VALUE)
            {
                btnExpValFormat.Text = "Show value format";
                for (int i = 0; i < gridData1.GetColAmount(); i++)
                {
                    for (int j = 0; j < gridData1.GetRowAmount(); j++)
                    {
                        dataGridView1.Rows[j].Cells[i].Value = gridData1.GetCellExpression(i, j);
                    }
                }
                FOD = FormatOfData.EXPRESSION;
            }
            else
            {
                btnExpValFormat.Text = "Show expression format";
                for (int i = 0; i < gridData1.GetColAmount(); i++)
                {
                    for (int j = 0; j < gridData1.GetRowAmount(); j++)
                    {
                        dataGridView1.Rows[j].Cells[i].Value = gridData1.GetCellValue(i, j);
                    }
                }
                FOD = FormatOfData.VALUE;
            }
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            rbtnAddRowColumn.Hide();
            rbtnDeleteRowColumn.Hide();
            btnNColumns.Hide();
            btnNRows.Hide();
            lblNumberOfAddedDeletedRowsColumns.Hide();
            txtbxNRowsColumns.Hide();
            btnStopEditingRowsColumns.Hide();

            txtbxExpression.Hide();

            dataGridView1.AllowUserToAddRows = false;
            FOD = FormatOfData.VALUE;
        }