Asked by:
webuser control Problem

Question
-
User1466256281 posted
My web page(abc.aspx) have 2 web user control which have
(1) Drop Down box(D.ascx)
(2) Gridview (G.ascx)
how to a access Drop down(D.ascx) box in Gridview (G.ascx ) Page
Saturday, May 19, 2012 4:44 PM
All replies
-
User705563967 posted
Simple used in <ItemTemplated >
<asp:GridView ID="grdCategory" runat="server" AutoGenerateColumns="False" Width="1100px" DataKeyNames="CourseCatID" Font-Names="verdana,arial,helvetica,sans-serif" Font-Size="8pt" CellPadding="4" ForeColor="#333333" GridLines="None"> <Columns> <asp:ButtonField Text="SingleClick" CommandName="SingleClick" Visible="False" /> <asp:BoundField HeaderText="CourseCatID" Visible = "false" DataField="CourseCatID" /> <asp:TemplateField HeaderText="Course Category"> <ItemTemplate> <cuc1:CourseUserControl ID="CourseUserControl1" runat="server" /> </ItemTemplate> </asp:TemplateField> </Column> </asp:GridView>
Sunday, May 20, 2012 5:44 AM -
User3866881 posted
Hello Rituranjan:)
You should use FindControl method of the ascx control first to find out the GridView,and then use GridView1.Rows[index starting from 0].FindControl to locate the position of Dropdownlist.
Reguards!
Sunday, May 20, 2012 9:23 PM -
User1466256281 posted
my question is
First is drop down Control(ascx)
then Gridview Control(ascx)
not withhin gridview
how to access(find Code behind)
drop down Control(ascx)
in Gridview Control(ascx)
Tuesday, May 22, 2012 4:56 AM -
User3866881 posted
RituranjanHello:)
Sorry to hear that……:(
Would you mind showing us your aspx codes……?And please make what you want to find in bold……
Many thanks again!Kindly correct me……:)
Tuesday, May 22, 2012 5:01 AM