Access a control placed in AspxMenu SubMenuTemplate

<dx:MenuItem Name=”Search” ToolTip=”Arama”>
<Image IconID=”zoom_zoom_32x32″></Image>
<SubMenuTemplate>

<dx:ASPxGridLookup ID=”CustLookup” runat=”server” DataSourceID=”SqlDataCustomer” OnValueChanged=”Desti_ValueChanged” AutoPostBack=”True” TextFormatString=”{0}” KeyFieldName=”MuKod”>
<GridViewProperties>
<SettingsPager Mode=”ShowAllRecords”></SettingsPager>
</GridViewProperties>
<Columns>
<dx:GridViewDataTextColumn FieldName=”MuKod” Width=”50px” />
<dx:GridViewDataTextColumn FieldName=”MuAdi” Width=”100px” />
<dx:GridViewDataTextColumn FieldName=”MuTel” Width=”50px” />

</Columns>

</dx:ASPxGridLookup>

</SubMenuTemplate>

</dx:MenuItem>

 

DevExpress.Web.MenuItem item = ASPxMenu1.Items.FindByName(“Search”);

ASPxGridLookup look1 = item.FindControl(“CustLookup”) as ASPxGridLookup;

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *