Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

1. Control of Datagrid in VB.Net. using OLEDB connection

example:

 

a. how to select a row, press a button then it will copy every items in each cells in that single row to a particular textbox or variable?

 

b. how to refresh datagrid?

 

c. how to keep on adding item to datagrid, i found that once you bind it, you can't add anything new nor refresh the datagrid.

 

I ask this question because i use to MSHFlexgrid in VB 6 but i'm really unfamiliar with datagrid in the VB.Net

 

:(

Posted

There are 2-3 problems which you are facing .

 

1- Turn the data grid property "ReadOnly" to false because this might prevent you from adding new rows

 

2- DataGrid.Refresh method refreshs it.

 

3- DataGrid will not work as you are thinking it do in past in VB6.0 if you make changes to some data such are adding new rows it will not save it back to database unless you call the update command of data adapter. because ADO.NET is disconnected data model so you need to submit the data back to database if you want to save changes to it. just try make an idea about ADO.NET , how it works.

The one and only

Dr. Madz

eee-m@il

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...