Dynamic filters in C#

Feb 5, 2014 at 4:53 PM
[I moved this from SMedapati's post at http://nodexl.codeplex.com/discussions/276991 . -- Tony]

Hi Tony,

Hoping this thread is still active.
I am trying to implement dynamic filters from Excel in C#, where I used NodeXL to produce the graph. I have the graphical output and want to implement dynamic
filters on this graph.

Is there a way to implement dynamic filters in C#? If so please advice me.


Thanks,
Sravanthi.
Feb 5, 2014 at 5:09 PM
Edited Feb 5, 2014 at 5:24 PM
Hello, Sravanthi:

NodeXL's dynamic filters aren't easily duplicated in C# code in custom applications. The reason for this is that the logic for determining which vertices and edges should be visible can get quite complicated--it can involve 40 columns and 1,000 rows of data, for example--and I didn't think I could get that kind of logic to run fast enough in C#. Instead, I let Excel perform the logic using a series of chained "IF" formulas, which Excel excels at, so to speak. The result was fast dynamic filtering without my having to write a ton of slow C# code, but unfortunately that means that dynamic filters are now closely tied to Excel and can't be used directly in other applications, like your own.

We do, however, make available the custom range track bars I implemented for dynamic filters, and you can easily incorporate those in your application. You would then have to implement your own visibility logic as the user manipulates the track bars, and set the visibility of the graph's vertices and edges accordingly. As of today, the WinFormsControls Class Library, which contains the custom range track bars, is available here:

http://nodexl.codeplex.com/releases/view/78193

-- Tony
Feb 5, 2014 at 5:42 PM
Thanks for your quick response.

-- Sravanthi.