Replies: 1 comment 5 replies
-
@Pascall60 This is not a When working with the RenderTreeBuilder, structure your components the same way as you would with Razor components. When creating Example:
To accomplish the same with
IMPORTANT: Reset the index when starting a new https://learn.microsoft.com/en-us/aspnet/core/blazor/advanced-scenarios?view=aspnetcore-9.0 And, use the sample
You'll need to decide how you want to pass your Columns and Data to the component. IMPORTANT: This is not an official FluentBlazor example. The Please refer to the |
Beta Was this translation helpful? Give feedback.
-
Hi everyone
I have a problem with FluentDataGridCell.
I can't insert the values into the content?!
If anyone has an idea, it would be a great help to me.
I use FluentDataGrid, FluentDataGridRow and FluentDataGridCell in
BuildRenderTree().
I can correctly generate the header and the column names.
But I can't and can't find how to insert the values into a FluentDataGridCell correctly?!
Here is the rows / columns / values part:
` private void BuildDataRows(RenderTreeBuilder builder)
{
int idx = 0;
foreach (var line in lines)
{
var values = line.Split(',');
//
// This part generates an exception at runtime.
//
builder2.AddAttribute(idx++, "ChildContent", (RenderFragment)(builder3 =>
{
builder3.AddContent(idx++, values[i]);
}));
//
// And this part does nothing?
//
builder2.AddContent(idx++, values[i]);
`
Thanks.
Kind regards,
Pascal
Beta Was this translation helpful? Give feedback.
All reactions