RadhaKrishnaKiJaya
asked on
Dropdown column in a GridView
Hello Experts,
I have a GridView, where I want to add a DropDown column. When the page is loaded, the drop down should be populated with its selected value. Please let me know how to achieve it.
FYI, I am using ASP.NET and C#. Please try to help. Thank you in advance.
Thank you!
I have a GridView, where I want to add a DropDown column. When the page is loaded, the drop down should be populated with its selected value. Please let me know how to achieve it.
FYI, I am using ASP.NET and C#. Please try to help. Thank you in advance.
Thank you!
ASKER
Kyle,
Thank you for your quick response. In this, how would I get the selected item from the ddl when loaded?
Thank you!
Thank you for your quick response. In this, how would I get the selected item from the ddl when loaded?
Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Kyle,
What you have given is, it will act when the drop down value is changed. Which is one by one. My requirement is Save the changed DropDown values at the end when Save button is clicked.
In other words, I am trying to read all the dropdown values in the GridView, in the loop, just like we read regular a text field (row.Cells[3].Text) in GridView. Please let me know if we can do it.
Thank you!
What you have given is, it will act when the drop down value is changed. Which is one by one. My requirement is Save the changed DropDown values at the end when Save button is clicked.
In other words, I am trying to read all the dropdown values in the GridView, in the loop, just like we read regular a text field (row.Cells[3].Text) in GridView. Please let me know if we can do it.
Thank you!
ASKER
Kyle Abrahams
Thank you for your help. I really appreciate it. It worked like charm. I am sorry for late response.
Thank you again!
Thank you for your help. I really appreciate it. It worked like charm. I am sorry for late response.
Thank you again!
http://www.4guysfromrolla.com/webtech/050801-1.shtml
essentially you have: a template column with an item template and an edit item template.
Open in new window
in the code behind:
Open in new window