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
I'm trying to create a page with multiple fields to be used as parameters for filtering a GridView. I'm using a combination of two asp:dropdown lists and two check boxes. When I select a value in one ddl, I want to clear the value in the other ddl. I was trying to use the event "onTextChanged" but that doesn't seem to fire off on the client side and I cannot seem to find any event for an asp:ddl or asp:checkbox or asp:radio button that fires off on the client side.
Are there events, like onClientClick for asp:button, that fire on the client side for these controls when a selected value is changed or when the user clicks on them?
or do I need to use html controls instead?
Thanks for your help.
Here i am using dropdown that will retrive from database when i will select an item from dropdownlist then item rate display on the selection of dropdown item name.
how will do this???
How do i set a data source of a drop down list which is inside a grid view, snap shot of asp code given below , the Asp file name is DataEntry.aspx and there is method in the DataEntry.aspx.cs called DTB.BindData("Department"). i want to set the datasource to point to this method
<asp:GridView ID="GridViewEmply" DataKeyNames="EmployeeID" runat="server" AutoGenerateEditButton="True" ShowFooter="True" OnRowEditing = "GridViewEmply_RowEdit" OnRowCancelingEdit = "GridViewEmply_RowCancelingEdit"OnRowUpdating = "GridViewEmply_RowUpdating" OnRowCommand = "GridViewEmply_RowCommand"OnPageIndexChanging="GridViewEmply_PageIndexChanging" AllowSorting="True" AutoGenerateColumns="False" AllowPaging="True" Visible="false"><Columns><asp:TemplateField HeaderText="DepartmentName"><ItemTemplate><asp:Label ID="LabelEmplyDeptName" Text='<%# Eval("DepartmentName") %>' runat="server"></asp:Label></ItemTemplate><FooterTemplate><asp:DropDownList ID="ddlDept" runat="server" ></asp:DropDo
Hi. I have a itemtemplate inside a gridview.
<asp:TemplateField HeaderText="Enter OTP"> <ItemTemplate> <asp:Label ID="Label2" runat="server" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small" Text="PIN Num:"></asp:Label> <asp:TextBox ID="txtPIN" runat="server" Height="21px" Width="100px"></asp:TextBox> &
I am displaying large amount of data in gridview,the gridview placed within updatepanel,every 1sec i am refreshing updatepanel using ajax timer.my problem is while displaying large data the cpu performance is low,pls give idea to increase cpu performance..
I have databound GridView in my page and I have a hidden DIV in all rows. Each row contains a Button that I want it to make the DIV visible for me! how can I use that with jQuery?!
here is the code page:
I have a gridview pulling all data from one user. This gridview has an edit button and when that is clicked the gridview becomes too wide for the div/screen and I get a scroll bar. Since this gridview can only have one user in it anyway is it possible to display each field on seperate lines instead?