Filter child data from parent when grid columns are generated automatically

Hi. I have a DataGrid that is generating its columns dynamically, and I want to add a child record, but I only want the data in the child record to show where the values in the first column of the parent grid matches with the first column of the child grid. The grid (below) works fine, just doesn't filter the rows correctly. Can this be done?

TIA

                            <RadzenDataGrid RowSelect="ShowDetails" Data="@newItem.DataList" TItem="IDictionary<string, object>"
                                            AllowFiltering="true" FilterMode="FilterMode.SimpleWithMenu" AllowPaging="true" AllowSorting="true">
                                <Template Context="Child">
                                        <RadzenDataGrid RowSelect="ShowDetails" Data="@newItem.ChildData" TItem="IDictionary<string, object>"
                                        AllowFiltering="true" FilterMode="FilterMode.SimpleWithMenu" AllowPaging="true" AllowSorting="true">
                                        <Columns>
                                            @foreach (var newColumn in newItem.ChildColumnList)
                                            {
                                                <RadzenDataGridColumn TItem="IDictionary<string, object>" Title="@newColumn.Key" Type="newColumn.Value"
                                                      Property="@GetColumnPropertyExpression(newColumn.Key, newColumn.Value)">
                                                    <Template>
                                                        @if (newItem.ColumnList.ToList().IndexOf(newColumn) == 00 && !string.IsNullOrEmpty(newItem.ActionURL) && CommercialSalesPortal.Web.Code.LocalFunctions.IsNumeric(context[newColumn.Key].ToString()))
                                                        {
                                                            @((MarkupString)string.Format(newItem.ActionURL, context[@newColumn.Key]))
                                                        }
                                                        else if (CommercialSalesPortal.Web.Code.LocalFunctions.IsDate(context[newColumn.Key].ToString()))
                                                        {
                                                            @Convert.ToDateTime(context[newColumn.Key]).ToString("yyyy-MM-dd")
                                                            ;
                                                        }
                                                        else if (newColumn.Value == typeof(decimal))
                                                        {
                                                            if (context[newColumn.Key] == DBNull.Value)
                                                            {
                                                                @context[newColumn.Key]
                                                            }
                                                            else
                                                            {
                                                                @Convert.ToDecimal(context[newColumn.Key]).ToString("#,##0.0000")
                                                                ;
                                                            }
                                                        }
                                                        else
                                                        {
                                                            @context[@newColumn.Key]
                                                        }
                                                    </Template>
                                                </RadzenDataGridColumn>
                                            }
                                        </Columns>
                                    </RadzenDataGrid>    
                                </Template>
                                <Columns>
                                    @foreach (var newColumn in newItem.ColumnList)
                                    {
                                        <RadzenDataGridColumn TItem="IDictionary<string, object>" Title="@newColumn.Key" Type="newColumn.Value"
                                                              Property="@GetColumnPropertyExpression(newColumn.Key, newColumn.Value)">
                                            <Template>
                                                @if (newItem.ColumnList.ToList().IndexOf(newColumn) == 00 && !string.IsNullOrEmpty(newItem.ActionURL) && CommercialSalesPortal.Web.Code.LocalFunctions.IsNumeric(context[newColumn.Key].ToString()))
                                                {
                                                    @((MarkupString)string.Format(newItem.ActionURL, context[@newColumn.Key]))
                                                }
                                                else if (CommercialSalesPortal.Web.Code.LocalFunctions.IsDate(context[newColumn.Key].ToString()))
                                                {@Convert.ToDateTime(context[newColumn.Key]).ToString("yyyy-MM-dd");
                                            }
                                            else if (newColumn.Value == typeof(decimal))
                                            {
                                                if (context[newColumn.Key] == DBNull.Value)
                                                { @context[newColumn.Key] }
                                            else
                                            {@Convert.ToDecimal(context[newColumn.Key]).ToString("#,##0.0000");
                                        }
                                    }
                                    else
                                    { @context[@newColumn.Key]}
                                            </Template>
                                        </RadzenDataGridColumn>
                                    }
                                </Columns>
                            </RadzenDataGrid>

* List item

I figured it out. I used LINQ to filter the data source based on the parent value:

.Where(x => x[newItem.ParentChildConnectionField].ToString()==ParentData[newItem.ParentChildConnectionField].ToString())

It's working great now. Thank you