473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Please help me Datagrid with Dropdownlist using Createdatasource

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

Jan 17 '07 #1
0 786

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Bailey | last post by:
I am trying to dynamically build a DataGrid dynamically. The code runs OK but the DataGrid is never built and displayed. Can someone look at the following code and see if they can determine what...
1
by: DaveF | last post by:
When I select the first dropdownlist box, I need to be able to make several dropdownlist boxes on the fly and populate them from the database. Is this possible? If so, HOW? -- David Fetrow...
1
by: Jeremy | last post by:
I want my gird to sort only the items on the current page when I click on a column header. I wrote a little test app, but when I sort it pulls in items from other pages and places them on the current...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
5
by: Lie | last post by:
Hi all, I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid. In Edit mode, I need to get back all...
1
by: strout | last post by:
I know it's dumb ... sometimes frustrating I want the text and a dropdownlist align with both side of a table cell, i.e. text align left and dropdownlist align right. I cannot add more cells to...
4
by: Tim::.. | last post by:
Can someone tell me how I do a response.redirect using a linkbutton in a datagrid! I want to use the record id in a database to send a querystring to an HTML editor so that users are able to...
2
by: gane | last post by:
Hi I have a datagrid with bound columns generated in code behind with allowsorting set to true and OnSortCommand set to a sort function. I can see the sorted results only if i remove the...
0
by: mvisnich | last post by:
Hi, I am working in VS2005 (VB) environment and I have following problem: On one of my web pages I use Datagrid control which I dynamically load. I also use numerical paging with Datagrid....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.