gridview whith dropdown extender

Posted by Wafaa on Stack Overflow See other posts from Stack Overflow or by Wafaa
Published on 2009-07-15T12:09:22Z Indexed on 2010/03/30 15:13 UTC
Read the original article Hit count: 473

Filed under:
|
|

hello, I have gridview with TextBox Template field and DropDownExtender so when user click on the textbox another gridview will appear tha contain List of items and button to add the item to the first gridview. my qusetion is: how can i in the event of button click(which is in the extender gridview) to get the row index of the first gridview(which contain the textbox)?

thanks


        <cc1:DropDownExtender ID="uxItemExtender" runat="server" DropDownControlID="uxItemContainer" TargetControlID="uxItems"></cc1:DropDownExtender>
        <asp:Panel BackColor="AliceBlue" ID="uxItemContainer" runat="server" ScrollBars="Both" Height="400" Width="200">
        <asp:GridView ID="uxItemsView" runat="server" Font-Size="Small" AutoGenerateColumns="false" OnRowDataBound="uxItemsView_RowDataBound">
        <Columns>
        <asp:TemplateField HeaderText="Item Details">
        <ItemTemplate>
         <asp:Label ID="uxItemNameLbl" Text="Name :" runat="server"></asp:Label>
        <asp:Label ID="uxItemName" runat="server"></asp:Label><br />
        <asp:Label ID="uxItemDescriptionLbl" Text="Description :" runat="server"></asp:Label>
        <asp:Label ID="uxItemDescription" runat="server"></asp:Label><br />
        <asp:Label ID="uxItemPriceLbl" Text="Price :" runat="server"></asp:Label>
        <asp:Label ID="uxItemPrice" runat="server"></asp:Label><br />
        <asp:Button ID="uxSelectItem" runat="server" Text="Add Item" OnClick="uxSelectItem_Click" /><br />
        </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Picture">
        <ItemTemplate>
        <asp:Image ID="uxItemImage" runat="server" Width="45" Height="50" />
        </ItemTemplate>
        </asp:TemplateField>
        </Columns>
        </asp:GridView>
        </asp:Panel>
         </asp:TemplateField>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about gridview