Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Populated Label control inside gridview from outside dropdownlist.

Posted on 2009-07-14
1
Medium Priority
?
405 Views
Last Modified: 2013-12-17
I have a gridview and inside in one column of it a Label control. Also i have a dropdownlist control out of the gridview. I want the selected item in dropdownlist to be appearred in the label inside the gridview.

Any Help would be great!
0
Comment
Question by:nikavak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
Salim Fayad earned 1500 total points
ID: 24847653
It would be better to once an item is selected from the dropdownlist, to save this value into the database and then to bind the gridview to the database. This way, your value will be there.
But if you don't want to save it into the database, you can access the label as following:

((Label)(GridView1.Rows[0].FindControl("YourLabel"))).Text = DropDownList.SelectedItem.Text;

Open in new window

0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question