Results 1 to 15 of 15

Thread: [RESOLVED] [2005] how to get to DropDownList in GridView Control.

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Location
    3rd rock from the sun
    Posts
    360

    Resolved [RESOLVED] [2005] how to get to DropDownList in GridView Control.

    gooday all..

    working with the DataView Control under Visual Web Developer 2005 Express.
    DataGrid is databound.
    got a template column containing a DropDownList, defined like so:
    Code:
                    <asp:TemplateField Visible="False">
                        <EditItemTemplate>
                            <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ddl2source" DataTextField="Status"
                                DataValueField="statusID">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="ddl2source" runat="server" ConnectionString="<%$ ConnectionStrings:assetsConnectionString1 %>"
                                ProviderName="<%$ ConnectionStrings:assetsConnectionString1.ProviderName %>"
                                SelectCommand="SELECT assets.amstatus.* FROM assets.amstatus"></asp:SqlDataSource>
                        </EditItemTemplate>
    column's Visible=False till user click Edit then in the GridView1_RowEditing Event, i cgange Visible property to true like so:
    VB Code:
    1. GridView1.Columns(4).Visible = False
    2.         GridView1.Columns(5).Visible = True
    so DropDownList is availble to user to select new value for edited row. that works fine.

    i wish to show DropDownList to user only in the relevant cell of edited row..
    something like
    VB Code:
    1. GridView1.SelectedRow.Cells(4).Visible = False
    2. GridView1.SelectedRow.Cells(5).Visible = True
    or like
    VB Code:
    1. Dim mms As TableCell = New TableCell
    2. mms = GridView1.SelectedRow.Cells(4)
    3. mms.Visible=False

    alas, no go there..

    any ideas guys? possible task at all?

    thanks in advance for any help/ideas.
    Happy Friday,
    Last edited by josephine; Sep 5th, 2006 at 12:16 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width