Skip to content

custom editor for complex type #262

@MilesFan

Description

@MilesFan

Hi Andrew, how is it going?

I am trying to make custom renderer and editor for cells of complex type, say "Person".

The renderer part which is quite easy. However, I failed the editor part.

I found in BlazorDatasheet.Edit.BaseEditor where value is string-based, and complex type objects are converted to string (so the value of the person John becomes "Person")

BaseEditor.cs

[Parameter]
public EventCallback<string> OnValueChanged { get; set; }

public string CurrentValue
{
    get
    {
        return _currentValue;
    }
    protected set
    {
        bool num = _currentValue != value;
        _currentValue = value;
        if (num)
        {
            OnValueChanged.InvokeAsync(value);
            StateHasChanged();
        }
    }
}

Any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions