Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
access Button control from template column in XamWebGrid_InitializeRow event
posted

Is there any way to access Button control from template column in XamWebGrid_InitializeRow event ?

<igGrid:TemplateColumn Key="Edit" Width="50">
                                                <igGrid:TemplateColumn.ItemTemplate>
                                                    <DataTemplate>
                                                        <Button x:Name="BtnEditParameter" Content="Edit" Visibility="{Binding IsEdit}" Width="50"></Button>                                                       
                                                    </DataTemplate>
                                                </igGrid:TemplateColumn.ItemTemplate>
                                            </igGrid:TemplateColumn>

I want to access BtnEditParameter on XamWebGrid_InitializeRow event.

Please suggest.

-Pankaj

Parents
No Data
Reply
  • 8421
    Suggested Answer
    posted

    Hello,

    The InitializeRow event is too early in the order of events for the XamGrid. A better event to use is the CellControl attached event, which will also allow you update the button when values change. You can access the button by using e.Cell.Control.Content.

Children
No Data