RecipeとCooking Step 2つのリストがあります。
Recipeの項目を選択しますと、選択されたRecipeのCookingリストが表示されます。

このサンプルを実行するには以下の環境が必要です:
- Codeer.LowCode.Blazor DesignerのGettingStartedテンプレートでデザイナプロジェクトを作成されている
- RecipeとCooking Stepのモジュールが存在する
1. デザイナフィールドプロパティ設定
2. Scriptを追加
void DetailLayoutDesign_OnBeforeInitialization()
{
//Recipeリストの項目をクリックするときのみ、Cooking Listをロードしますので、
//Layout初期化前にCooking Listのデータローディングを禁止します。
ListCookingStep.AllowLoad = false;
}- デザイナでRecipeリストをクリックします
- 右側のプロパティパネル → OnSelectedIndexChanged項目でOnSelectedIndexChangedイベントを作成します
- Script編集Windowで以下のコードを追加します
void ListRecipe_OnSelectedIndexChanged()
{
//Cooking Listのデータローディングを再開します
ListCookingStep.AllowLoad = true;
//CookingStepモジュールで検索条件を設定します
var searcher = new ModuleSearcher<CookingStep>();
var selectedRecipeId = ListRecipe.Rows[ListRecipe.SelectedIndex].Id.Value;
//Recipeリストで選択されたRecipeIdがCookingStepのRecipeIdと一致するCookingStepのみを検索
searcher.AddEquals(steps=>steps.Recipeid.Value, selectedRecipeId);
//検索条件を適用してCooking Listをリロードします
ListCookingStep.SetAdditionalCondition(searcher);
ListCookingStep.Reload();
}

