Exemplo n.º 1
0
        /// <summary>
        /// Called by the <i>filter manager</i>, inits the <i>column filter</i> and raises the FilterInitializing event.
        /// </summary>
        /// <param name="FilterManager">The <i>filter manager</i>.</param>
        /// <param name="FilterHost">The filter host.</param>
        /// <param name="gridColumn">The DataGridView column.</param>
        /// <param name="boundDataView">The bound data view.</param>
        public void Init(DgvFilterManager FilterManager, DgvBaseFilterHost FilterHost, DataGridViewColumn gridColumn, DataView boundDataView)
        {
            this.mFilterManager      = FilterManager;
            this.mFilterHost         = FilterHost;
            this.mDataGridViewColumn = gridColumn;
            this.mBoundDataView      = boundDataView;
            this.mOriginalDataGridViewColumnHeaderText = gridColumn.HeaderText;
            if (gridColumn.DataPropertyName != "")
            {
                this.mColumnDataType = boundDataView.Table.Columns[gridColumn.DataPropertyName].DataType;
            }
            else
            {
                this.mColumnDataType = typeof(string);
            }
            FilterHost.FilterClientArea.Controls.Add(this);
            FilterHost.Location = new System.Drawing.Point(0, 0);
            this.Visible        = false;
            CancelEventArgs e = new CancelEventArgs(false);

            OnFilterInitializing(this, e);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Called by the <i>filter manager</i>, inits the <i>column filter</i> and raises the FilterInitializing event.
 /// </summary>
 /// <param name="FilterManager">The <i>filter manager</i>.</param>
 /// <param name="FilterHost">The filter host.</param>
 /// <param name="gridColumn">The DataGridView column.</param>
 /// <param name="boundDataView">The bound data view.</param>
 public void Init(DgvFilterManager FilterManager, DgvBaseFilterHost FilterHost, DataGridViewColumn gridColumn,DataView boundDataView)
 {
     this.mFilterManager = FilterManager;
     this.mFilterHost = FilterHost;
     this.mDataGridViewColumn = gridColumn;
     this.mBoundDataView = boundDataView;
     this.mOriginalDataGridViewColumnHeaderText = gridColumn.HeaderText;
     if (gridColumn.DataPropertyName != "")
         this.mColumnDataType = boundDataView.Table.Columns[gridColumn.DataPropertyName].DataType;
     else
         this.mColumnDataType = typeof(string);
     FilterHost.FilterClientArea.Controls.Add(this);
     FilterHost.Location = new System.Drawing.Point(0, 0);
     this.Visible = false;
     CancelEventArgs e = new CancelEventArgs(false);
     OnFilterInitializing(this, e);
 }