This is a migrated thread and some comments may be shown as answers.

Component in GridColumn Template

2 Answers 20 Views
This is a migrated thread and some comments may be shown as answers.
Atif
Top achievements
Rank 1
Atif asked on 24 Feb 2020, 11:22 AM

I have added Component in <TelerikGrid>/<GridColumn>/<Template>. Grid is loading based on data in a text field. All columns are getting update except column having component.

 

<GridColumns>
        <GridColumn Field="@(nameof(Fee.FEE_ID))" Title="STD">
            <Template>
                @{
                    Fee Fee = context as Fee;
                    <RTP_SMS.Pages.Components.CompStdNN id="@Fee.FEE_ID"></RTP_SMS.Pages.Components.CompStdNN>
                }
            </Template>
        </GridColumn>
 </GridColumns>

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 24 Feb 2020, 12:22 PM

Hello Atif,

Can you confirm that the CompStdNN uses the OnParametersSet/OnParametersSetAsync event to update? Once instantiated the first time in the grid, if the grid data changes, the child component will only receive new parameters, it will not initialize from scratch, so logic running in the OnInitialized event will not fire.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
0
Atif
Top achievements
Rank 1
answered on 24 Feb 2020, 12:32 PM

I did not added OnParametersSet or OnParametersSetAsync, but after adding it resolved issue.

 

Thanks for quick response.

Tags
Grid
Asked by
Atif
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Atif
Top achievements
Rank 1
Share this question
or