12
Answers

Populating DropDownList in a DataGrid

Photo of Maruli Lee

Maruli Lee

18y
6k
1
I am currently developing a small program in C#.NET. Since I am just beginning to learn this language, I decided to work on DataGrid since it is a very good component used throughout the web.

Let's say I have a DataGrid (dgOne) and within dgOne I have 2 columns. I also have a button called btnShow.

First column contains DDL (ddlOne).
Second column contains TextBox (txtOne).

What I want to achieve is that upon the click of btnShow I will populate dgOne with values retrieved from the database.

I have tested the codes populating only a single DDL (not in a DataGrid) and it works fine. I just somehow can't get the program to populate the DDL. Anyone would be able to guide this newbie out? Any suggestions, advices, links will be greatly appreciated.

Answers (12)