Note that there are some explanatory texts on larger screens.

plurals
  1. PODataTable filter: Get all the elements of the same group of the result
    primarykey
    data
    text
    <p>I've filled the datagrid with a datatable. I can filter this datatable with rowfilter. I search the product and get the result. But I want to get also the other products in the same group.</p> <p><strong>My Code</strong></p> <pre><code>&lt;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"&gt; &lt;Grid&gt; &lt;DataGrid x:Name="testGrid" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False"&gt; &lt;DataGrid.Columns&gt; &lt;DataGridTextColumn Binding="{Binding GROUP}" Header="GROUP"/&gt; &lt;DataGridTextColumn Binding="{Binding PRODUCT}" Header="PRODUCT"/&gt; &lt;/DataGrid.Columns&gt; &lt;/DataGrid&gt; &lt;/Grid&gt; &lt;/Window&gt; Private Sub Window_Loaded_1(sender As Object, e As RoutedEventArgs) 'Create tabel Dim table As 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 like '%Monitor%'" 'Fill Datagrid testGrid.DataContext = table End Sub </code></pre> <p>Here is the screenshots of what I need:</p> <p><img src="https://i.stack.imgur.com/dn10L.png" alt="what I get"> this would be ===> <img src="https://i.stack.imgur.com/Xd5dE.png" alt="what I need"> </p> <p>How can I do this with datatable filter?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload