Data does not exist in the current context

I get this error when creating a new page from wizard using 'Data Grid Inline Edit'. The error is in page.razor file. Looks like the data object should be called customer in my case.

Instead of this:

            <RadzenGridColumn TItem="MailBlazorC.Models.SalesData.Customer" Context="mailBlazorCModelsSalesDataCustomer" Property="CustNo" Title="Cust No">
          <EditTemplate Context="mailBlazorCModelsSalesDataCustomer">
            <RadzenTextBox style="width: 100%; display: block" @bind-Value="@((data.CustNo))" Name="CustNo">
            </RadzenTextBox>
          </EditTemplate>
        </RadzenGridColumn>

This:

            <RadzenGridColumn TItem="MailBlazorC.Models.SalesData.Customer" Context="mailBlazorCModelsSalesDataCustomer" Property="CustNo" Title="Cust No">
          <EditTemplate Context="mailBlazorCModelsSalesDataCustomer">
            <RadzenTextBox style="width: 100%; display: block" @bind-Value="@((customer.CustNo))" Name="CustNo">
            </RadzenTextBox>
          </EditTemplate>
        </RadzenGridColumn>

Please advise.

Hi Josh,

It should be called mailBlazorCModelsSalesDataCustomer - this is definitely a bug and we will do our best to fix it immediately!.

Seems fixed in Radzen v2.42.5 Thanks!

PS. Is there a quick way to add inline edit capabilities to an existing grid? As in a toggle rather than adding edit templates to every field and doing the save\edit buttons manually?

Hi Josh,

No way to enable this on existing grid easily - only defining EditTemplate column by column. We will think on how to provide this.

Thanks @enchev
I’ve tried a few work arounds to save effort such as copy and paste grids from one page (created via wizard) to another page. This causes another set of problems such as grid names in event expressions don’t match and the data context name differs even though it’s the same entity. Not sure if the latter is because my project is created on earlier versions but it would be swell if RadZen autocorrected the former on paste. Im learning a lot. Perhaps more ideas to think about. Keep up the great work.