In gridView I have dropdown list :
<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False" DataKeyNames="P roductID" DataSourceID="S qlDataSource1">
<Columns>
<asp:BoundFie ld DataField="Prod uctID" HeaderText="Pro ductID" InsertVisible=" False"ReadOnly= "True" SortExpression= "ProductID" />
<asp:BoundFie ld DataField="Prod uctName" HeaderText="Pro ductName" SortExpression= "ProductNam e" />
<asp:TemplateFi eld HeaderText="dro pdown">
<ItemTemplate >
<asp:DropDownLi st ID="DropDownLis t1" runat="server" DataSourceID="S qlDataSource2" DataTextField=" CustomerName" DataValueField= "CustomerID ">
</asp:DropDownLis t>
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
</asp:GridView>
<asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server" ConnectionStrin g="<%$ ConnectionStrin gs:NorthwindCon nectionString %>" SelectCommand=" SELECT [ProductID], [ProductName] FROM [Alphabetical list of products]"></asp:SqlDataSour ce>
<asp:SqlDataSou rce ID="SqlDataSour ce2" FilterExpressio n="ProductID='{ 0}'" runat="server" ConnectionStrin g="<%$ ConnectionStrin gs:NorthwindCon nectionString %>" SelectCommand=" SELECT [CustomerName], [CustomerID] FROM [Invoices] " >
<FilterParamete rs>
<asp:ControlPar ameter Name="Title" DefaultValue="0 "/>
</FilterParameter s>
</asp:SqlDataSour ce>
Now, I would like to filter the sqlDataSource for dropdown list, to fill only that rows into dropdown which has productID equal to the productID of the row, where the dropdown is placed.
(so, sqlDataSource is fileterd dynamically for each row)
I was trying to do that with select parameter but no success. Now, I'm trying to do that with Filter parameter but also got stock.
Any example, idea, help?
Thanks,S