How to make a global change to DataGrid?

  • Thread starter Thread starter Mr. B
  • Start date Start date
M

Mr. B

In my app, I get the info/data that I want from an Access data base (ADO.net).
And I display the data in a DataGrid for editing. The information displayed
is 1 to 7 lines depending upon the info.

What I want to do is to change some text, globally, that is in the 'thrid'
column ("description") with new text that is typed in a Textbox by the User.
So the user makes the change and then clicks an update button. Each of the
lines have the 'same' text in the 'third' column. So I'm only replacing it
with new info string.

I know how to display the data to a DataGrid... what I don't know is HOW to
specifically point to all the rows (0 to 6) in column 3 to do the text
replacement.

Any thoughts?

Thanks!

Bruce
 
Hi Mr B.

As far as I know can you not directly change data in the datagrid.

A datagrid has always a datasource.

Let's say it is a datatable without that you have made any style

Than you can do something as (just typed here watch typos)

\\\
dim dr as datarow
for each dr in mytable.rows
dr(2) = mytextbox.text
next
///

I hope this helps,

Cor
 
Cor said:
As far as I know can you not directly change data in the datagrid.
A datagrid has always a datasource.
Nutz!

Than you can do something as (just typed here watch typos)

Hmmm.... I'll try it. If not, then I'll try to reload the data and insert my
new string while that is happenening. But in thinking, there must be a way as
you 'can' modify a cell (if you have allowed it to be done). Oh well... I'll
keep on plugging away.

Thanks!

Bruce
 
Back
Top