D
D
DancingOnWater2017-11-10 14:42:37
SQLite
DancingOnWater, 2017-11-10 14:42:37

How to call a window for a user control in the designer, similar to add column for Datagridview?

There is a user control. for the most part, it delegates the behavior of the DataGridView. The Columns property sticks out. It all looks like this

public partial class ControlList : UserControl
    {
        [
            Editor( typeof(System.ComponentModel.Design.DesignerCollection), typeof(System.Drawing.Design.UITypeEditor)),
            DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
            MergableProperty(false)
        ]
        public DataGridViewColumnCollection Columns { get { return datagGridView.Columns; } }
}

Everything would be fine, but if you call the Columns editor and add a column in it, then in the designer we will see something like this:
this.dataGridViewColumnId = new System.Windows.Forms.DataGridViewColumn();

And as a result we will receive an execution error. Because type must be specified. Datagridview calls a separate window for this, but here it is not called and you have to get into the code. How can you do without the latter and do everything in the designer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Melnikov, 2019-08-17
@Alenorze

SELECT * FROM tbl_scan_instance WHERE guid IN
(SELECT scan_guid FROM tbl_scan_investigation_relationships WHERE investigation_id = xxx);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question