All pastes #605448 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-07-06 05:47 UTC
rendered paste body
int i = 0;
            foreach (DataRow row in Products.Tables["Products"].Rows)
            {
                string value = row["test"].ToString();
                string newVal = value.Trim();

                if (value == null)
                {
                    i += 1;
                }
            }

            if (i == 0)
            {
                ProductDataGrid.Columns["test"].Visible = false;
                MessageBox.Show("test successfully hidden");
            }