2.0: GridView associated to DropDownList

Discussion in 'ASP .Net' started by R.A.M., Jun 27, 2006.

  1. R.A.M.

    R.A.M. Guest

    Hi,
    Please help. I have definied a GridView associated to DropDownList but
    it's not visible. Here's the code:

    <asp:DropDownList ID="Publishers" runat="server"
    DataSourceID="PublishersSQL" DataTextField="Name"
    DataValueField="Name" AutoPostBack="True" />
    <asp:SqlDataSource ID="PublishersSQL" runat="server"
    ConnectionString="<%$ ConnectionStrings:SQLServerConnectionString %>"
    SelectCommand="SELECT Name FROM Publishers ORDER BY Name">
    </asp:SqlDataSource>
    <asp:GridView ID="Books" runat="server"
    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
    DataSourceID="BooksSQL" GridLines="None">
    <Columns>
    <asp:CommandField ShowSelectButton="True" />
    </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="BooksSQL" runat="server"
    ConnectionString="<%$ ConnectionStrings:SQLServerConnectionString %>"
    SelectCommand="SELECT Books.Title, Books.Author, Books.ISBN FROM Books
    INNER JOIN Publications ON Books.ISBN = Publications.ISBN WHERE
    (Publications.PublisherName = @Publisher) ORDER BY Books.T">
    <SelectParameters>
    <asp:ControlParameter ControlID="Publishers"
    Name="Publisher" PropertyName="SelectedValue" Type="String" />
    </SelectParameters>
    </asp:SqlDataSource>

    Thank you
    /RAM/
    R.A.M., Jun 27, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SnVhbmpv?=

    GridView: Filtr DropDownList from another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,847
    =?Utf-8?B?SnVhbmpv?=
    Dec 23, 2005
  2. =?Utf-8?B?SnVhbmpv?=

    GridView: Filter DropDownList for another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 29, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,283
    =?Utf-8?B?SnVhbmpv?=
    Dec 29, 2005
  3. keithb
    Replies:
    1
    Views:
    11,914
    shauns1
    Nov 1, 2006
  4. R.A.M.
    Replies:
    0
    Views:
    344
    R.A.M.
    May 30, 2006
  5. R.A.M.
    Replies:
    0
    Views:
    351
    R.A.M.
    Jun 27, 2006
Loading...

Share This Page