Skip to content

FluentDataGrid - TemplateColumn - FluentSelect ignoring my demands! #4103

@Terrence77

Description

@Terrence77

FluentBlazorApp1.zip

Or, I am just doing it wrong.

Trying to get a FluentSelect TemplateColumn to show the Department associated with the context.

I am able to get it to work with the basic InputSelect.

<FluentDataGrid Items="Items.AsQueryable()">
	<PropertyColumn Property="@(p => p.Name)" Title="Name" />

	<TemplateColumn Title="InputSelect" Style="overflow: visible;">
		<InputSelect class="form-select" @bind-Value="context.DepartmentID" @bind-Value:after="() => DoWork(context)">

			<option value="">
				Select Budget Category ...
			</option>

			@foreach (var dept in Departments)
			{
				<option value="@dept.DepartmentID">@dept.DepartmentName</option>
			}
		</InputSelect>
	</TemplateColumn>

	<TemplateColumn Title="FluentSelect" Style="overflow: visible;">
		<FluentSelect Items="@Departments"
					  TOption="Department"
					  Value="context.Department"
					  ValueChanged="() => DoWork(context)">

			<OptionTemplate Context="dept">
				<FluentLabel Typo="Typography.Body" Color="@Color.Accent">
					@dept.DepartmentName
				</FluentLabel>
			</OptionTemplate>
		</FluentSelect>
	</TemplateColumn>

</FluentDataGrid>

Here is a screenshot of the incorrect behavior in the 3rd column

Image

Metadata

Metadata

Labels

needs: author feedbackThe author of this issue needs to respond in order for us to continue investigating this issue.status:in-progressWork is in progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions