I have a grid. I am using a custom form to display details and edit the details.
I am using this ...
<LienholderDetails @bind-SelectedRecord="@selectedRecord" mode="@mode" OnSave="@Save" OnClear="@ClearSelection"></LienholderDetails>
in the parent component after the grid. @mode is add, view, edit, etc. And I use textboxes in the child component ...<TelerikTextBox @bind-Value="@SelectedRecord.Name" Label="Company Name" Enabled="@enabled" />
which are enabled or not depending on the mode passed as a parameter. If a user is authorized to edit the details and clicks "Edit" I wanted to either call the child component with enabled=true or set the @enabled value to true in code. This avoids having two identical layouts, one enabled and one not.
How would I go about this? Obviously I would do this for other control types as well.