System.Windows.Forms.GridTableStylesCollection.Add(System.Windows.Forms.DataGridTableStyle)

Here are the examples of the csharp api class System.Windows.Forms.GridTableStylesCollection.Add(System.Windows.Forms.DataGridTableStyle) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: clrprofiler
Source File: ReportForm.cs
View license
private void Detail0Style(DataGrid dg, DataTable dt, DataGridTableStyle style, int dghightf)
		{
			/n ..... /n //View Source file for more details /n }

2. Example

View license
private void ResetDataSet()
        {
            if (ds == null)
            {
                ds = new DataSet("fileProperties");
                ds.Locale = CultureInfo.InvariantCulture;
                dataGridProperties.DataSource = ds;
                dataTable = new DataTable("properties");
                dataTable.Locale = CultureInfo.InvariantCulture;
                ds.Tables.Add(dataTable);
                nameColumn = dataTable.Columns.Add("name");
                valueColumn = dataTable.Columns.Add("value");
                dataGridProperties.DataMember = "properties";

                // Create new Table Style
                dataGridProperties.TableStyles.Clear();
                DataGridTableStyle ts = new DataGridTableStyle();
                ts.MappingName = dataTable.TableName;
                dataGridProperties.TableStyles.Add(ts);

                //set the width of the name column
                dataGridProperties.TableStyles[dataTable.TableName].GridColumnStyles[nameColumn.ColumnName].Width = 200;
                UpdateTableSize();
            }

            dataTable.Clear();
        }