Find checkbox control in ASPxGridView

前端 未结 1 583
我在风中等你
我在风中等你 2021-01-23 15:31

I have a AspxGridView that has a checkbox dataitemTemplate inside a gridViewDatacheckColumn. Now I want to find that control for each row and uncheck/check them on runtime.

1条回答
  •  广开言路
    2021-01-23 15:55

    You are using wrong method ASPxGridView.FindRowTemplateControl which searches for the specified server control contained within the specified data row's template.

    You should use the ASPxGridView.FindRowCellTemplateControl method to find a control residing in the column's DataItemTemplate container or specified data cell's template.

    Please also refer to the Accessing Controls Contained within Templates topic

    References:
    ASPxGridView - How to find a control inside the DataItem template
    Cant find ASPxTextBox control in DataItem template using FindRowTemplateControl

    0 讨论(0)
提交回复
热议问题