Question about Wisej.Web.Ext.ColumnFilter

0
0

Ciao,

1 – Is it possible to map a filter to the column of a datagrid programmatically? In the example of your guide (https://wisej.com/blog/columnfilter/) it would seem you can only make this association from the interface.

2 –The downloaded example (see attachment) does not work

Grazie,

Alessandro

 

 

 

 

Attachment
  • You must to post comments
0
0

Ciao,

I have two more questions…
1 – What event should I use to display the number of filtered rows on a label?
2 – How do I see if there is an active filter or not?

Grazie
Alessandro
P.S. You’re doing a great job!

  • Levie (ITG)
    Hi Messere, Thanks for the feedback! You may need to make a few minor changes to the source of the extension (found here: https://github.com/iceteagroup/wisej-extensions/tree/2.2/Wisej.Web.Ext.ColumnFilter). Take a look at this blog post: https://wisej.com/blog/columnfilter/. 1) To get the count of visible (filtered) rows, you can use this.dataGridView1.Rows.GetRowCount(DataGridViewElementStates.Visible); You can apply at the end of the panel’s “OK” button click handler. 2) If you look at the blog post, you’ll see the panels have a “DataGridViewColumn” property that can be used in conjunction with the OnApplyFilter() method to determine if a column had rows hidden (active). Please let me know if this works for you! -Levie
  • You must to post comments
0
0

Grazie mille!

  • You must to post comments
0
0

Ciao Messere,

For your first question, it is possible! Any changes you make to properties of controls in the designer are reflected in C# code in InitializeComponent() in the partial Designer.cs class.

You can expand the node of your Window or Page in the Solution Explorer window to see the Designer class.

The ColumnFilter extension uses a Property Extender (See: https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.iextenderprovider?view=net-5.0) that allows it to insert properties to objects of a specific type (DataGridViewColumn).

You’ll see the new property in the Designer, but it is not visible using Intellisense.

To apply a filter programmatically, it will look something like this:

 this.columnFilter1.SetShowFilter(this.Column1, true);

 

For the second question, we’ll get that link fixed for you ASAP!

 

Hope that helps.

 

Best,

Levie

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.