When I try binding a checkbox within a template for a datagrid column - Property is 'Ignore' - and it seems to expect a variable to be used for @bind-Value, but I'm using an IEnumerable for the data source so I try to use a lambda expression as the @bind-Value but then I get compile errors. Am I approaching this wrong?
Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
The left-hand side of an assignment must be a variable, property or indexer
You cannot use two-way binding with such expression - you need to provide property. I strongly suggest you to check Blazor documentation for more info about bindings.
Ok. I changed the IEnumerable to a List and if I do something like this I'm able to get to the property - now the issue is figuring out how to get it to refer to the correct index on each row (i.e. not hard code it - which also may be more about learning how to use Blazor than the Radzen grid):
I'm trying to do something similar, albeit with a template and context to display the checkboxes and flip the value but not having any luck as I can't bind a template's context to the checkbox... Not sure if I should make a new topic since its so similar.
Ok, so I suppose we are trying to accomplish something similar then
Let me try to post this code again... the template with context, under the datagrid column declaration
That was it, I was missing the context. I put the data source back to an IEnumberable and this is working - and I was able to use properties for the parameters I'm passing in the change event: