how can i find control in CellTemplate

old code:

            for (int i = 0; i < gridTableInfo.Items.Count; i++)

            {

                try

                {

                    DataGridRow neddrow = (DataGridRow)gridTableInfo.ItemContainerGenerator.ContainerFromIndex(i);

                    CheckBox cb = (CheckBox)gridTableInfo.Columns[0].GetCellContent(neddrow);

                    cb.IsChecked = ckbSelectedAll.IsChecked;

                }

                catch (Exception ex)

                {

                    var nnn = ex;

                }

            }



1 Reply

VS Vijayarasan Sivanandham Syncfusion Team December 13, 2021 01:07 PM UTC

Hi Guitarpark,

You can get the reference of the control which is added inside the DataTemplate of the GridTemplateColumn in SfDataGrid. For more information, please refer the below knowledge base documentation link,
 
 
Vijayarasan S 


Loader.
Up arrow icon