Click here to Skip to main content
15,888,286 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: .net4.0 Pin
Abhinav S18-Nov-13 22:46
Abhinav S18-Nov-13 22:46 
AnswerRe: .net4.0 Pin
joginder-banger15-Dec-13 8:13
professionaljoginder-banger15-Dec-13 8:13 
QuestionBound Datagridview Column Which Shows Name instead of ID. Pin
Dinesh Prajapati15-Nov-13 1:49
Dinesh Prajapati15-Nov-13 1:49 
AnswerRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Richard MacCutchan15-Nov-13 2:52
mveRichard MacCutchan15-Nov-13 2:52 
GeneralRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Dinesh Prajapati15-Nov-13 9:43
Dinesh Prajapati15-Nov-13 9:43 
GeneralRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Richard MacCutchan17-Nov-13 22:18
mveRichard MacCutchan17-Nov-13 22:18 
AnswerRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
WuRunZhe17-Nov-13 21:19
WuRunZhe17-Nov-13 21:19 
AnswerRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Peter Leow23-Nov-13 3:59
professionalPeter Leow23-Nov-13 3:59 
You question is a typical example of "id" as value versus "name" as display, id is unique and is the primary key of a database table but name is the description and not unique. It is unreasonable to remember ids, and it is error prone to type names. Solution is to have a combo box populated with ids as value and the corresponding names as text. User will only see list of names in the combo box for their selection, when selected, your program will then capture the value that is the id of the selected name.

In C#, you can create a combox box whose ValueMember = "id" and DisplayMember ="name" and add this combo box to a datagridview column.

In this way, users neither have to remember ids nor names, and no typo either.
GeneralRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Dinesh Prajapati30-Dec-13 18:20
Dinesh Prajapati30-Dec-13 18:20 
GeneralRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Peter Leow30-Dec-13 19:02
professionalPeter Leow30-Dec-13 19:02 
GeneralRe: Bound Datagridview Column Which Shows Name instead of ID. Pin
Dinesh Prajapati31-Dec-13 20:07
Dinesh Prajapati31-Dec-13 20:07 
QuestionDisplay data from SQL into a form Pin
Member 1038849413-Nov-13 10:16
Member 1038849413-Nov-13 10:16 
AnswerRe: Display data from SQL into a form Pin
Pete O'Hanlon13-Nov-13 11:42
mvePete O'Hanlon13-Nov-13 11:42 
Questionwebtransform issue... anyone? Pin
Desvariovsk13-Nov-13 6:31
Desvariovsk13-Nov-13 6:31 
AnswerRe: webtransform issue... anyone? Pin
WuRunZhe17-Nov-13 21:21
WuRunZhe17-Nov-13 21:21 
GeneralRe: webtransform issue... anyone? Pin
Desvariovsk18-Nov-13 1:33
Desvariovsk18-Nov-13 1:33 
QuestionRe: webtransform issue... anyone? Pin
Eddy Vluggen21-Nov-13 7:28
professionalEddy Vluggen21-Nov-13 7:28 
QuestionRefreshing DGV after db (access 2007) changed Pin
jose mandurrino13-Nov-13 5:54
jose mandurrino13-Nov-13 5:54 
QuestionMessage Closed Pin
13-Nov-13 4:37
Member 1039931913-Nov-13 4:37 
QuestionSaving to DataBase Pin
Member 1038849412-Nov-13 2:14
Member 1038849412-Nov-13 2:14 
AnswerRe: Saving to DataBase Pin
Abhinav S12-Nov-13 2:27
Abhinav S12-Nov-13 2:27 
GeneralRe: Saving to DataBase Pin
Member 1038849412-Nov-13 2:30
Member 1038849412-Nov-13 2:30 
GeneralRe: Saving to DataBase Pin
Member 1038849412-Nov-13 2:34
Member 1038849412-Nov-13 2:34 
AnswerRe: Saving to DataBase Pin
Member 1038849412-Nov-13 2:35
Member 1038849412-Nov-13 2:35 
SuggestionRe: Saving to DataBase Pin
Richard Deeming12-Nov-13 2:59
mveRichard Deeming12-Nov-13 2:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.