TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Elmar
NA
11
0
Problem with DropDownList
May 26 2013 10:53 PM
I have 3 tables, DataGridView and DropDownList
TABLES:
tblACTIONS: ID, UnitID, etc
tblUNITS: UnitID, UnitName, LocationID
tblLOCATIONS: LocationID, Location
This is how I populate the grid
SELECT tblACTIONS.ID, tblUNITS.UnitName & ' - ' & tblLOCATIONS.Location AS XYZ,
FROM (((tblACTIONS INNER JOIN tblUNITS ON tblACTIONS.UnitID = tblUNITS.UnitID)
INNER JOIN tblLOCATIONS ON tblUNITS.LocationID = tblLOCATIONS.LocationID)
This is how I populate the Dropdown (ID1 – valuemem; XYZ –displaymem)
SELECT tblUNITS.UnitID AS ID1, tblUNITS.UnitName & ' - ' & tblLOCATIONS.Location AS XYZ
FROM tblUNITS INNER JOIN tblLOCATIONS ON tblUNITS.LocationID = tblLOCATIONS.LocationID
I'd like to click on the grid's row and to set the dropdownlist text
ddUnit.Text = dGr.Rows[e.RowIndex].Cells["XYZ"].Value.ToString();
But it doesn't work - the dropdownlist still has first blank unselected text. Can anybody point me to a solution (please)?
Reply
Answers (
2
)
C# linq to sql uses a default setting
Font Size via C#