I am new to using datagridviews and wanted to know how to populate certain fields.

I have created a form and added a datagridview (named GridSellProducts) with Visual Studio designer and added 8 columns with the first named Item. I have also changed the column type for Item to DataGridViewComboBoxColumn also in design view.

I have the following data (product names) that I want to populate the combobox with for each row that may be added:

// get products
productsURL = "https://eko-app.com/Products/list_products/sessionId:" + sessionID + ".json";

var products = Products.GetProducts(productsURL);

List<string> productNames = new List<string>(); <-----the data  to add to the combobox

foreach (var p in products)
{
     var x = p.Product;

     foreach (var pn in x)
     {
          productNames.Add(pn.name);                  
     }        
}

How do I add the above data to the column combobox Item that will let a user be able to type a product name and also have an autocomplete feature. I am using WinForms.

I am trying to figure out what you mean?

I am sorry any way of explaining better of what you want it to do?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.