473,769 Members | 5,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Returning data from a datagrid

Wassup guys/gals.

I'm really new to VB *cringe*, and i'm tryna to easily,
expeditiously return a row(that i double click) from a
data grid populated with data from an access database.

what's the simplest way to do this?

and if i wanted to update it later on?

Thanks.

Arch
Nov 20 '05 #1
1 935
Cor
Hi Arch,

You have to populate the datagrid from a datatable (a part of the dataset)
and bind it using the datasource.
All editing can be done from the datagrid except deleting a row from the
datatable.

A sample to delete a row from the dataset is
\\\
Private Sub btndel_Click(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles btndel.Click
dataset1.Tables (0).Rows(datagr id1.CurrentRowI ndex).Delete()
End Sub
///
I hope this helps?

Cor
Wassup guys/gals.

I'm really new to VB *cringe*, and i'm tryna to easily,
expeditiously return a row(that i double click) from a
data grid populated with data from an access database.

what's the simplest way to do this?

and if i wanted to update it later on?

Thanks.

Arch

Nov 20 '05 #2

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

Similar topics

3
1771
by: Phil | last post by:
Hi, I have a client/server app. that uses a windows service for the server and asp.net web pages for the client side. My server class has 3 methods that Fill, Add a new record and Update a record. The Fill and Add routines work as expected but unfortunately the update request falls at the 1st hurdle. I pass two params to the remote(server) method for the update, one is the unique ID and the other is a string that is the name of the table...
4
5444
by: Randy | last post by:
I have a DataTable in a DataGrid. If I click on the DataGrid, HitTestInfo in dataGrid1_MouseDown returns a Row and Column number. I can use the Row number to say: DataRow dr = dataTable.Rows; Of course, I get completely the wrong row of data if the user has sorted the table by clicking any of the column headers.
9
1646
by: Pam Ammond | last post by:
After clicking btnDeleteSize_Click in frmSize, I move to frmSizeDelete, allow deleting a Size using a datagrid, and then return to frmSize and want to update the datagrid in frmSize to reflect the deletion. I can't figure out how to get the datagrid in frmSize updated, although the datagrid in frmSizeDelete shows the deletion properly. In frmSizeDelete the size is properly deleted when the user clicks the row in the datagrid and presses...
7
2196
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from another. I have tried declaring them as shared, public, friend, etc and I always get an error stating that something is not valid on a local variable declaration. For example, in the following code for Sub DataGrid_Select, I have CurrentID and...
2
2715
by: Brian Mitchell | last post by:
Ok, I know this is an elementary question but I have a data grid that is bound to a data table and I can't seem to find a way to match the selected row in the grid with it's respective row in the underlying data table. If the rows in the grid are in the same order as the rows in the table then I can use the Datagrid.CurrentRowIndex to return the same row from the data table. But if the user sorts the data in the grid then the row order...
1
1240
by: Peter W Johnson | last post by:
Hi Guys, I have a form setup with a Datagrid. The Datagrid has a combobox in one column. I am trying to find out the value of the combobox after it has been changed. I have added a handler for the SelectIndexChanged event to the TableStyles Class as follows:- AddHandler ComboTextCol.ColumnComboBox.SelectedIndexChanged, AddressOf
1
2875
by: Anup | last post by:
Hi Group, I have a datagrid with dropdown in my application. I want to fill the data in dropdown by an ArrayList for that I am using "e.Item.FindControl("DropdownId")" but this function is returning NULL THUS I m getting exception "Object Refrence not set to an Instance to Object", Here is the code I wrote (ASP.NET 1.1)...
5
1768
by: MarkAurit | last post by:
I have a gridview that some boundfield and buttonfield controls. I have a data element I 1. want to use when the button is clicked for a given row, but 2. dont want it visibly displayed in the gridview so I created a boundfield with visible=false as the first column (something I did in the datagrid). In my RowCommand event I do some processing using the online docs as a template. The problem is that when I reference the boundfield as...
0
1026
by: flowk1337 | last post by:
I have a grid view with a datatable as it's datasource in VB. I can successfully import the data into the grid view and see it. I have my website set up so that the user can edit all fields at once and mass update them. So on a button click(fulfill), the program retrieves all rows from the datagrid and saves them to a new datatable. This works while debugging and on another server I have updated it too. But when I publish this website onto...
0
10222
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10050
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
9999
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
9866
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
8876
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
7413
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
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
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
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.