R
R.A.M.
Hi,
I have a problem with definition of GridView assoctiated to
DropDownDataList: GridView is not displayed.
Here is the code:
<asp
ropDownList 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.Title">
<SelectParameters>
<asp:ControlParameter ControlID="Publishers"
Name="Publisher" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Database tables are defined and filled correctly (I have checked).
Please help.
Thank you very much.
/RAM/
I have a problem with definition of GridView assoctiated to
DropDownDataList: GridView is not displayed.
Here is the code:
<asp
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.Title">
<SelectParameters>
<asp:ControlParameter ControlID="Publishers"
Name="Publisher" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Database tables are defined and filled correctly (I have checked).
Please help.
Thank you very much.
/RAM/