0

Hi, all

I Have a problem with the DropDownList in a DataGridView( I am using ASP.Net c#).

I Would like to fill the DropDownList in the DataGridView with information retrieved from a DataTable for example if a particular product I have 10 left in stock I would like to fill the DropDownList from 1-10 so that the customer can only buy from 1-10 as Quantity of that particular product,

The problem is that in the code behind since the DropDownList is in a DataGridView I cannot access it directly therefore I can't user DropDownList1.Items.add("");

Any Suggestions please?

Thanks,
Regards Chris.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by mlesniak
0

Try posting your question to the ASP.NET forum.
This forum is for classic ASP.
If you can not access the DropDownList directly I'm not sure how you are able to populate it.
Is it possible to just limit the range of values (i.e. no more than 10) perhaps?

Hi, all

I Have a problem with the DropDownList in a DataGridView( I am using ASP.Net c#).

I Would like to fill the DropDownList in the DataGridView with information retrieved from a DataTable for example if a particular product I have 10 left in stock I would like to fill the DropDownList from 1-10 so that the customer can only buy from 1-10 as Quantity of that particular product,

The problem is that in the code behind since the DropDownList is in a DataGridView I cannot access it directly therefore I can't user DropDownList1.Items.add("");

Any Suggestions please?

Thanks,
Regards Chris.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.