473,943 Members | 29,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button in DataGrid (WinForms)

Hi all, I have generated a dynamic DataTable which I then bind to a datagrid
in my application.

What I want to do is add a column which contains a button relating to each
row in the datatable. When a user clicks on the button an event is raised so
I can show the user more information pertaining to information in the
current row..

I have tried the following..
[vbcode]
' Create the table
objDT = New System.Data.Dat aTable("Compute r")

' Add the columns
objDT.Columns.A dd("Select", GetType(Button) )

' Add in a button...
Dim oButton As New Button
oButton.Text = "Select"
objDR("Select") = oButton

' Add the row to the datatable
objDT.Rows.Add( objDR)

[/vbcode]

I then bind the above datatable to my datagrid and I get no errors but no
button appears... Is it even possible to place a button in a datagrid???

Thanks in advance for any ideas/ other methods...
Cheers

Jul 21 '05 #1
0 1402

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

Similar topics

6
18298
by: Shivang | last post by:
Hello Everybody, I am using Datagrid in VB.net. I don't want the auto generation of rows in the datagrid (last row shouldnt be the new row with empty values)..in addition to this the datagrid should not be readonly..that is I should be allowed to edit the values in datagrid. You help will be appreciated.
5
2293
by: John Spiegel | last post by:
Hey all, I have contusions and I think a minor concussion after trying to find information on advanced WinForms DataGrid use. Does anyone know of a site / book that gets really in-depth on the DataGrid? I've found a number of postings and help topics but would like to find something that treats the DataGrid as a topic, not just a loose collection of hundreds of articles. TIA,
3
1736
by: JAdrianB | last post by:
I'm trying to use a datagrid for data entry. I've created a couple of combo box columns using information from http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q480q That example basically sets every combobox in a given column (for every row) to the same datasource. One obstacle I have to overcome is when a user changes a value in one column, the next combobox in the next column on the same row needs to bind to a new set of data, and...
6
1738
by: BBFrost | last post by:
I'm using Net 1.1 (2003) SP1 & Windows 2000 Here's the issue ... Rows 12 thru 24 are selected in a datagrid. The user now unselects rows 12 thru 24 and selects rows 45 thru 70 ??? How can I tell that the user has reselected a different set of rows in a datagrid.
1
1174
by: Ken Dopierala Jr. | last post by:
Hi, I have a datagrid that I fill with a dataset. I would like to add a column that includes a button (and maybe in the future other controls like CheckBoxes). I can do this with the ASP Datagrid fairly easily. But I don't know how to do this with a Windows Forms Datagrid in VB. Thanks for any help or links. Ken.
1
2376
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .. http://sf-f.org, weblog and search engine for fans and writers of
1
1592
by: MCDave | last post by:
Hi all, I'm trying to get a datagrid to display a button in every row, so that when the user clicks on it, the value from the first column (record index) is read, and then a new window opens for the user to see the full record (for editing or what not). I've seen examples in ASP.Net all over the place, but none for Windows Forms. Alternatively the user could just click on a row (no button) and the window
0
330
by: Mark | last post by:
Hi all, I have generated a dynamic DataTable which I then bind to a datagrid in my application. What I want to do is add a column which contains a button relating to each row in the datatable. When a user clicks on the button an event is raised so I can show the user more information pertaining to information in the current row.. I have tried the following..
1
1485
by: TonyJ | last post by:
Hello! If there is a datagrid in VS2005 for winforms what kind of datagrid is it then. 1.Is it a bound datagrid that has a direct connection to columns for tables in the database. 2. Is it an open datagrid that has no connection to the databse as the bound datagrid have. We have began to use a third party datagrid that is called flygrid but I
0
9970
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11299
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10662
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9865
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8219
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4910
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.