View Complete Post
Hello. I am working through Scott Mitchell's ASP.Net in 24 hours book. I am finishing the photo album project.
I have a GridView that retrieves a list of uploaded photo rows for the logged-in user.The GridView is for editing and deleting rows.
The photo Category field in the Gridview is a dropdown list. The text entry field was deleted after converting this field to a Template.
Like the uploaded photos, these Categories are user-specific. They are created in another web page.
Users also have the option to select "none" for the category when they upload an image.
For the GridView: The Category ID field's ItemTemplate and EditItemTemplate both have a " - None - " choice added to them.
I am getting this error:
'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
Note: The ID for the ItemTemplate for that dropdown list is the ID listed above in the error: "pictureReadOnlyCategories".
Am I missing some step in this process of changing a GridViews text field to a dropdown that can be used for editing? I went through the book's instructions three times.
Here is my code for the dropdown list and a screenshot of the Design
Edited by Nancy Michell
MSDN Magazine October 2001
hi i have a grid view with radio button...schedule/approve/reject...by defualt schedule radio button is selected....but when i chage radio button selection option to anyth other than schedule it still store only schedule in DB.wats the pblm?could someone help me>
<asp:GridView ID="Gridgpapp" runat="server" DataSourceID="ApprovalGp" AutoGenerateColumns="False"
AllowPaging="True" AllowSorting="True" BorderColor="#3366CC" BackColor="White" BorderStyle="None"
BorderWidth="2px" CellPadding="4" ShowFooter="True" EmptyDataText = "No Gatepass waiting for Approvals">
<RowStyle BackColor="White" ForeColor="#003399" />
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
I have a radio button list item on the page.
I have dropdownlist box in that i add the columns names like aa,bb,cc okay?
I want to selected items moved to textbox with ,' aa','bb','cc' like that i want to add to the text box.
Through add Button.
Y because i want to insert into the database.