Please help me Datagrid with Dropdownlist using Createdatasource

A

althafexcel

How can i add a dropdown using the below on third column. Please have a
look at my code. And how am i going to add events to it. How to find
each item selected in the datagrid when submit occurs. Please help me.


datagrid1.datasource=createdatasource()
datagrid1.databind()


function createdatasource()

Dim dt As New DataTable
Dim dr As DataRow

dt.Columns.Add(" ")
dt.Columns.Add("Title")
dt.Columns.Add("Dropdownhere")


dr = dt.NewRow()
dr(0) = datareader("field1")
dr(1) = datareader("field2")
dr(2) = 'how to add a drop down in this place
dt.Rows.Add(dr)

Dim dv As New DataView(dt)
Return dv

end Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,522
Latest member
Mad-Ram

Latest Threads

Top