[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

08/29/2009 at 09:31PM PDT, ID: 24692669
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

GridView HiddenField

Asked by RecipeDan in Programming for ASP.NET

Tags: ASP.Net

Hello:

A have a drop down box in a gridview that populates based on the hideen value in the gridview. When I run the script there is no error but the dropdown box does not populate.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
<asp:GridView ID="GridView1" DataKeyNames="Value_Number_Scale" runat="server" AutoGenerateColumns="False" DataSourceID="GridViewSource" Width="584px">
        <Columns>
        <asp:TemplateField>
        <ItemTemplate>
        <asp:HiddenField Value="<%#Eval("Value_Number_Scale")%>" ID="QuestionValue" runat="server" />
        </ItemTemplate>
        </asp:TemplateField>
            <asp:BoundField DataField="Question_Item" HeaderText="Question_Item" SortExpression="Question_Item" />
            <asp:BoundField DataField="Questions" HeaderText="Questions" SortExpression="Questions" />
            <asp:TemplateField>
            <HeaderTemplate>Response</HeaderTemplate>
            <ItemTemplate>
                <asp:DropDownList ID="QuesValueList" runat="server" />
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        Dim Ques As TextBox = CType(e.CommandSource, TextBox)
        Dim gvRow As GridViewRow = Ques.BindingContainer
        Dim strValue As String = GridView1.DataKeys(gvRow.RowIndex)(0).ToString()
        LoadQuesValueList()
    End Sub
    Private Sub LoadQuesValueList()
        Dim QuesValueList As DropDownList
        Dim conn As SqlConnection
        Dim comm As SqlCommand
        Dim reader As SqlDataReader
        Dim connectionString As String = ConfigurationManager.ConnectionStrings("ValueConn").ConnectionString
        conn = New SqlConnection(connectionString)
        comm = New SqlCommand("SELECT Item_Value, Item_Score FROM ValueID WHERE Value_Number_Scale = @strValue", conn)
        Try
            conn.Open()
            reader = comm.ExecuteReader()
            QuesValueList.DataSource = reader
            QuesValueList.DataValueField = "Item_Score"
            QuesValueList.DataTextField = "Item_Value"
            QuesValueList.DataBind()
            reader.Close()
        Catch ex As Exception
        End Try
    End Sub
[+][-]08/29/09 09:58 PM, ID: 25216408

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/29/09 11:22 PM, ID: 25216524

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/30/09 01:01 AM, ID: 25216720

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/30/09 02:59 AM, ID: 25216997

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/30/09 09:20 AM, ID: 25218183

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/30/09 11:00 AM, ID: 25218519

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/30/09 01:13 PM, ID: 25219099

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/30/09 02:01 PM, ID: 25219333

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/30/09 06:55 PM, ID: 25220207

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/31/09 08:01 AM, ID: 25223320

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/31/09 11:13 PM, ID: 25228904

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/01/09 07:25 AM, ID: 25231893

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/09 07:09 PM, ID: 25264686

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/12/09 04:19 PM, ID: 25318344

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Tags: ASP.Net
Sign Up Now!
Solution Provided By: guru_sami
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625