Pass a unique key from a Gridview to other controls on page...HELP!!

K

KT

How do you pass/get a control from another grid. In the Grid below, I'd
like to get the plate_id (which is the datakeynames value) to use on other
grids selectcommand on the page.

First Gridview looks like this:

<asp:GridView ID="GridViewPlate" SelectedIndex="0" runat="server"
AutoGenerateSelectButton="true" DataSourceID="SqlDataSource2"
DataKeyNames="plate_id" >

<Columns>

<asp:BoundField DataField="plate_id" HeaderText="plate_id"
SortExpression="plate_id" />

<asp:BoundField DataField="mfg_num" HeaderText="mfg_num"
SortExpression="mfg_num" />

<asp:BoundField DataField="order_date" HeaderText="order_date"
ReadOnly="True" SortExpression="order_date" />

</Columns>

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:printstreamDB %>"

SelectCommand="pr_Plate_Lookup_BySearchValue"
SelectCommandType="StoredProcedure">

<SelectParameters>

<asp:ControlParameter ControlID="txtSearch" Name="mfg_num"
PropertyName="Text" Type="String" />

</SelectParameters>

</asp:SqlDataSource>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top