473,395 Members | 1,464 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.

adding button columns to datagrids

Could someone tell me how to add a button column to a datagrid, in a
Windows Form?

Here's where I'm at:

----------------------------------------------------------------------------
objOleDbDataAdapter = New OleDbDataAdapter("SELECT LNAME FROM
EMPLOYEE", objOleDbConnection)

objOleDbDataAdapter.Fill(objDataSet, "Employees")

DataGrid1.DataSource = objDataSet

DataGrid1.DataMember = "Employees"
-----------------------------------------------------------------------------

When I display the datagrid, I want 2 columns: 1 which lists the lname
of the employee, and another which consists of a button which allows
the user to go to a "details" page for that employee. I know this is
easy to do in a web app, but I can't figure out how to do this using
Windows Forms.

Any help would be greatly appreciated.
Thanks!
Nov 22 '05 #1
3 1988
Hi Cyril,

You can add a button column in Design view. Select the datagrid, go
into the "Columns" propery in the properies window and add a "Button
Column".

take care,
Michelle

Nov 22 '05 #2
Hi Michelle,

Thanks for you reply. Are you sure this applies to datagrids withing a
Windows Form? I'm using VS.net 2003 and I don't see a "Columns"
property in the properties window.

Thanks,
Cyril
"Michelle" <Mi******@bwalk.com> wrote in message news:<11**********************@g14g2000cwa.googleg roups.com>...
Hi Cyril,

You can add a button column in Design view. Select the datagrid, go
into the "Columns" propery in the properies window and add a "Button
Column".

take care,
Michelle

Nov 22 '05 #3
Sorry, I must have glazed over the bit where you wrote it was a
windows form. I took a look and, like you, I couldn't find an obvious
way to add a button column. I use a ListView in my applications for
what you need - so that a double click on the row or a button next to
the ListView will tigger the event to show the details of the item
selected.

sorry I wasn't more helpful

Michelle

Nov 22 '05 #4

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

Similar topics

3
by: Cyril Tiwari | last post by:
Could someone tell me how to add a button column to a datagrid, in a Windows Form? Here's where I'm at: ----------------------------------------------------------------------------...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
6
by: Bart Schelkens | last post by:
Hi, I have another question. On my asp-page I put a label. I manually create a table and set that table in the text of the label. This way my table is displayed. My question is how can i...
1
by: Srinivasa Rao | last post by:
I have binded the two datagrids from database from two different tables. In both datagrids, the first column contains checkbox. In between the datagrid, i have "Add -->" and "Remove -->" buttons in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.