GridView & DDL!!

V

Vai2000

Hi All, I have a grid view with TemplateFieldColumn as DropDownList. So
bascially when a user decides to edit/update teh Row he gets a choice from
the DDL bascially 2 choices
<asp:TemplateField HeaderText="Hot" Visible="True">
<EditItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" >
<asp:ListItem Value="0">Hot</asp:ListItem>
<asp:ListItem Value="1">New</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
..
My Update somehow isn't working...

<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/App_Data/mydata.mdb"
SelectCommand="SELECT [Part_No], [Hot], [New] FROM
[ItemTypes]"
UpdateCommand="UPDATE [ItemTypes] SET [Hot]=@Hot,[New]=@New
WHERE [Part_No]=@Part_No">
<SelectParameters>
<asp:ControlParameter Name="Choice"
ControlID="DropDownList1" />
</SelectParameters>
<UpdateParameters>
<asp:parameter Name="Part_No" />
<asp:parameter Name="Hot" />
<asp:parameter Name="New" />
</UpdateParameters>
</asp:AccessDataSource>

I am struggling in the part where I can set the UpdateParameters...
Bascially ItemTypes is a table with PartNo,Hot=boolean,New=boolean

TIA
 

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,059
Latest member
cryptoseoagencies

Latest Threads

Top