Question valueMember vs DisplayMember

That's exactly what happens by default. When you start editing a ComboBox cell the cell's Value property is assigned to the ComboBox's SelectedValue property to set the current selection. When you end an editing session the ComboBox's SelectedValue is assigned to the cell's Value property. If you've set the ValueMember of the column then it's the ValueMember that controls the SelectedValue, not the DisplayMember.
 
I'm not sure that's right in all cases; if you change a column from the default textbox to be a combo, the display and value members arent set for you..

Maybe if you change the data sources detail to combo before you drop he grid on the form.. but I probably didn't do that..

Anyways, I once made a movie of doing a datagridview combo. OP should take a look at attachment 2 in:
http://www.vbdotnetforums.com/articles-interest/22245-cjard-movies.html
 
ok guys i think u didnt check the example i sent , i am trying 2 tell u i am not using the control , i am trying 2 make it from the code , just try 2 explain what iam doing in the attached example .
thanx again.
 
You'll find that a lot of people are not going to download entire projects. You actually didn't try to tell us that you aren't using the control, but you should have. Please provide a full and clear description of the problem rather than just expecting us to work it out for ourselves by running your project. If we need to see code then you should post the relevant code directly. Attaching an entire project should be a last resort. Also, if you do attach an archive it's a good idea to use ZIP rather than RAR, because you know that everyone can open a ZIP file.
 
thanks for reply , but i sent the RAR file 2 explain what i want , i dont know where i should put something or change something 2 get what i want , so i cant figure it out in the code so here s the example and the database , if anyone can help it would b just great .. thanx alot .

main_item.rar
 
Here are some clues to getting your question answered:

Say what youre trying to do (in clear numbered steps if necessary)
Say what you have done (in clear numbered steps if necessary)
Say what problem youre encountering (including the exact text of any error messages)

Use the file forum zip attachment feature to attach a ZIP only if you're asked to do so.

To be less diplomatic than jmc; we're here to give you advice for free because we want to. If you make our lives difficult by just uploading an archive in some less popular format, to some file sharing service, and saying "my code in there has a problem what is it" youre going to get no help at all; why should we do all the running when you want the help? If you want someone to do that, post your question up on ExpertsExchange where the points vultures will be happy to entertain you in a Q&A tooth-pulling exercise
 

Latest posts

Back
Top