我想通过 id 在我的 gridview.Template 详细信息行中找到控件
bool IsAllAud = false;
var item = (CheckBox)VendorsGrid.Templates.DetailRow.FindControl("CBIsAllAudience");
IsAllAud = item.Checked;
if (IsAllAud)
{
}
<dx:ASPxGridView ID="rt" ClientInstanceName="rt" runat="server"
AutoGenerateColumns="false" DataSourceID="rtt" KeyFieldName="ID" Width="100%">
<SettingsDetail AllowOnlyOneMasterRowExpanded="true" />
<Columns>
<dx:GridViewDataTextColumn FieldName="Name" Caption="Name" />
</Columns>
<Templates>
<DetailRow>
<asp:CheckBox ID="CBIsAllAudience" runat="server" />
...