I run the following code to put a drop-down list in each cell (it works !)

MySqlDataReader RdrSecteur = Cnx.ExecuteSql("SELECT Sct_Id, Sct_Libelle FROM Secteur ORDER BY Sct_Libelle");
iGDropDownList dplSecteur = new iGDropDownList();
dplSecteur.FillWithData(RdrSecteur, "Sct_Id", "Sct_Libelle");

string Sql = "SELECT Id, Secteur, Service, Traducteur, Middleware FROM v_tbl_Gestionnaire";

DataSet myDataSet = new DataSet();
myDataSet = SelectRows(myDataSet, Sql);


iGridGestionnaire.Cols[1].CellStyle.DropDownControl = dplSecteur;

I take the value --> OK

string text = iGridGestionnaire.Cells[2, "Secteur"].Text.ToString(); --> Sct_Libelle

How can I retrieve the id from my controlbox in a grid cell ?

string value_id = iGridGestionnaire.Cells[2, "Secteur"]... ; --> Sct_Id ?????

Thank you for your help ;-)
If we understand your question properly, the id value should be placed into the cell value:

iGridGestionnaire.Cells[2, "Secteur"].Value

Have you tried to retrieve this expression?

FYI: Please, ask technical questions in this 'Questions and Issues' forum section.
Sorry for not being in the right section ;-)

I tried your proposal but let it be :

string b = iGridGestionnaire.Cells[2, "Secteur"].Tetxt.ToString();
string c = iGridGestionnaire.Cells[2, "Secteur"].Value.ToString();

This gives the same answer.

In fact I associated a combobox to a column. This one is composed of an ID and a value.
This displays the value when you select a cell of this column. Perfect.
On the other hand I thought that it would store (somewhere in the cell) the ID.
But I can't find it.

Maybe with this
string b = iGridGestionnaire.Cells [2, "Sector"].DropDownControl
but how?
Do you attach the drop-down list to the column's cell style AFTER you have populated the grid? If so, then iGrid does not know that it must link cell values to drop-down list items.

In any case, it would be nice to see an example demonstrating your problem. Can you send us a simple solution we can launch on our side? You can replace replace real data providers with local DataTables or something like that to demonstrate the issue.

Before packing the solution to zip, please, remove the bin, obj and the hidden .vs subfolders with executable contents.
Hello and sorry for the delay ;-)

I'm sending you an example. The questions are in the source code.

Thank you for your answers (16kb) downloaded 3 time(s).
Yes, I was right. You attach the drop-down list AFTER you added data to the grid. Look at this part of your code:

iGrid1.FillWithData(myDataSet.Tables[0], true);
iGrid1.Cols[1].CellStyle.DropDownControl = dplCombo;

To solve your problem, you can create the required set of columns before calling FillWithData and link dplCombo before you call FillWithData. Or, if you want to save some time and make your code universal, use the following trick instead.

Call iGrid's FillWithData right after you created the main table (i.e. when it does not have data rows yet):

DataTable dtA = new DataTable(); 


Then use the following code to attach the drop-down list and populate your grid:

iGrid1.Cols[1].CellStyle.DropDownControl = dplCombo;
iGrid1.FillWithData(myDataSet.Tables[0], true);

Pay attention to the second Boolean parameter of the overloaded FillWithData version I used. It forces iGrid to use the existing column set with the drop-down list attached to the 2nd column.

This solution is an answer to both questions. You will see what you expect in the combo cells and the cell value and cell text will return the ID and Text respectively.

I would not have found this trick to first initialize the grid with the table and then add the drop-down list .
And finally to only complete with the data from the table.

Thank you!