Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0
Hi Everyone,
I want to display the combo box inside the grid cell's when i double clicked on the cell. After the combo box open, on click the combo i want to display a new grid.
i have tried some code..
private ComboBox combo = new ComboBox();
       private void PONewMain_Load(object sender, EventArgs e)
           string s = cmb_purchase.Text;
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
this.combo.Location = this.dataGridView1.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true).Location;
combo.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();

It displaying the combo box, but i dont know how to set a event on combo mouseclick in the grid combo..
Please help
Thanks in advance
Posted 25-Feb-13 20:42pm
Edited 25-Feb-13 20:43pm

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

  Print Answers RSS
0 OriginalGriff 730
1 CPallini 320
2 Sergey Alexandrovich Kryukov 305
3 BillWoodruff 295
4 Peter Leow 255

Advertise | Privacy | Mobile
Web04 | 2.8.141029.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100