Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have doubt about datagridviewcell.
i have created textboxcolumn in datagridview. when ever i click the particular cell the cell should change to datagridviewcomboboxcell. Also i need to add the item in combobox collection.
when i go to another cell then, the new cell get datagridviewcombobox cell and existing cell should change to datagridviewtextbox cell...




kindly any one help me to do this. advance thanks for your help.
Can Any One help meeee....
Posted
Updated 29-Jun-11 22:39pm
v3

 
Share this answer
 
Comments
Ragi Gopi 30-Jun-11 3:03am    
Can u plz guide me to another example..plzzzzz
Prerak Patel 30-Jun-11 3:05am    
Did you try anything from this link? I guess, you are working on forms application, right?
Ragi Gopi 30-Jun-11 3:08am    
yes, am working on forms application.
i tried first link...but its clear for me..
Prerak Patel 30-Jun-11 3:14am    
Just try that code, or google.
Ragi Gopi 30-Jun-11 3:19am    
thx...
I put my solution to your first question (that on 28 June) because I didn't see this one. I hope there's no problem to post it here again.


Hi. I managed to do something like this.
First I tried with CellBeginEdit and CellEndEdit but the ComboBox control didn't appear (just it's editable box). Then I used CellClick and CellValidating. It worked, but I had to solve the "reentrant call" problem - finally I find the solution on the net.
I explained it here: Dynamically change DataGridViewTextBoxCell to DataGridViewComboBoxCell
P.S.
If you manage to use CellBeginEdit and CellEndEdit, please post the solution here - I'm very curious about it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900