wpf - DataTable filter: Get all the elements of the same group of the result -


i've filled datagrid datatable. can filter datatable rowfilter. search product , result. want other products in same group.

my code

<window x:class="window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="window1" height="129" width="124" loaded="window_loaded_1">   <grid>     <datagrid x:name="testgrid" itemssource="{binding}" autogeneratecolumns="false" canuseraddrows="false">         <datagrid.columns>             <datagridtextcolumn binding="{binding group}" header="group"/>             <datagridtextcolumn binding="{binding product}" header="product"/>         </datagrid.columns>     </datagrid>   </grid> </window>  private sub window_loaded_1(sender object, e routedeventargs)      'create tabel     dim table new datatable     table.columns.add("group", gettype(string))     table.columns.add("product", gettype(string))     table.rows.add("group1", "printserver")     table.rows.add("group1", "recupel")     table.rows.add("group2", "docking")     table.rows.add("group2", "monitor")      'set filter     table.defaultview.rowfilter = "product '%monitor%'"      'fill datagrid     testgrid.datacontext = table  end sub 

here screenshots of need:

what get ===> what need

how can datatable filter?


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

xml - How do I use an xdoxslt variable inside xsl code, in BI Publisher? -