|
-
Jun 4th, 2023, 10:52 PM
#1
Thread Starter
Addicted Member
Datagrid view both Combobox AND Autofilter
Using VB.Net, I would like to know if a datagridview column can be set in the designer to both a Combobox AND an Autofilter type?
Regards
-
Jun 5th, 2023, 01:23 AM
#2
Re: Datagrid view both Combobox AND Autofilter
What's an Autofilter type column? That doesn't sound like something that the DataGridView does out of the box. Please provide a full and clear explanation of the problem.
-
Jun 5th, 2023, 02:26 AM
#3
Thread Starter
Addicted Member
Re: Datagrid view both Combobox AND Autofilter
I have referenced a .dll called DataGridViewAutoFilter.dll.
I then have an option to set the datagridview's column type to DataGridViewAutoFilterTextBoxColumn.
When I run the application, I have a down arrow in the datagridview column header.
Other columns are of type combobox. My question is whether it is possible to have those combobox columns also autofilter types?
-
Jun 5th, 2023, 04:43 AM
#4
Re: Datagrid view both Combobox AND Autofilter
They are two different types. One thing cannot be two different types at the same time. What you can do is create a new type that includes the functionality of the other two types.
Given the name DataGridViewAutoFilterTextBoxColumn, I would guess that it inherits from DataGridViewTextBoxColumn and adds some extra functionality. You could probably derive a new class from DataGridViewComboBoxColumn and add that same functionality and name it DataGridViewAutoFilterComboBoxColumn.
-
Jun 5th, 2023, 05:19 AM
#5
Re: Datagrid view both Combobox AND Autofilter
 Originally Posted by jmcilhinney
One thing cannot be two different types at the same time.
Before someone points out that that is not strictly true, I'm talking about the run time type of an object. I'm not talking about base types or interfaces.
-
Jun 12th, 2023, 08:46 PM
#6
Re: Datagrid view both Combobox AND Autofilter
 Originally Posted by GideonE
I have referenced a .dll called DataGridViewAutoFilter.dll.
Do you have access to the code of that .dll?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 13th, 2023, 12:48 AM
#7
Hyperactive Member
Re: Datagrid view both Combobox AND Autofilter
 Originally Posted by jmcilhinney
What's an Autofilter type column? That doesn't sound like something that the DataGridView does out of the box.
Indeed. First thing comes in my mind is "AutoFilterRow" (not column) which was provided by DevExpress exclusively for their "DataGridView" control, the "GridControl" as a built-in feature. Automatically connected to your db and does queries as shown:

So GideonE, If you've seen GridControl benefits but it is difficult to work with and you want to switchover back to DataGridView, I'm afraid you should write them down.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|