I want to find control in my gridview.Template detail row by id
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" />
...
Since this is DetailRow you will need to call ASPxGridView.FindDetailRowTemplateControl Method
var item = VendorsGrid.FindDetailRowTemplateControl(index, "CBIsAllAudience");