Home All Groups Group Topic Archive Search About

A couple of easy datagrid questions

Author
24 Apr 2006 7:13 AM
melton9
I'm just getting into using datagrid and have a couple of questions.

1.)How do you get the grid to show the values of a datatable
automatically?  Currently I have to hit the + sign and then select
"getNews"(the datatable) to show my data.

2.)  I have this set up to a loop.  So after I view my grid any updates
in the loop causes the datagrid to go blank(ie gray box).

Anybody know what I should add to make the datagrid correctly
repopulate on every loop?

Author
24 Apr 2006 11:13 AM
Ken Tucker [MVP]
Hi,

1) Set the datagrid's datasource to the dataset.tables("TableName") or
dataset.tables(0)

2) Post some code

Ken
----------
<melt***@hotmail.com> wrote in message
Show quoteHide quote
news:1145862785.501159.8480@i40g2000cwc.googlegroups.com...
> I'm just getting into using datagrid and have a couple of questions.
>
> 1.)How do you get the grid to show the values of a datatable
> automatically?  Currently I have to hit the + sign and then select
> "getNews"(the datatable) to show my data.
>
> 2.)  I have this set up to a loop.  So after I view my grid any updates
> in the loop causes the datagrid to go blank(ie gray box).
>
> Anybody know what I should add to make the datagrid correctly
> repopulate on every loop?
>
Author
24 Apr 2006 2:53 PM
Peter Proost
1) datagrid.datasource = myDataSet.tables(0)
2) datagrid.refresh

hope this helps

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

<melt***@hotmail.com> schreef in bericht
Show quoteHide quote
news:1145862785.501159.8480@i40g2000cwc.googlegroups.com...
> I'm just getting into using datagrid and have a couple of questions.
>
> 1.)How do you get the grid to show the values of a datatable
> automatically?  Currently I have to hit the + sign and then select
> "getNews"(the datatable) to show my data.
>
> 2.)  I have this set up to a loop.  So after I view my grid any updates
> in the loop causes the datagrid to go blank(ie gray box).
>
> Anybody know what I should add to make the datagrid correctly
> repopulate on every loop?
>
Author
24 Apr 2006 2:59 PM
Peter Proost
I can now see that my post was a bit late and Ken already answered, but
that's because I forget to press F5 before posting :-)

Greetz Peter


--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

Show quoteHide quote
"Peter Proost" <pproost@nospam.hotmail.com> schreef in bericht
news:#sxdI76ZGHA.1200@TK2MSFTNGP03.phx.gbl...
> 1) datagrid.datasource = myDataSet.tables(0)
> 2) datagrid.refresh
>
> hope this helps
>
> Greetz Peter
>
> --
> Programming today is a race between software engineers striving to build
> bigger and better idiot-proof programs, and the Universe trying to produce
> bigger and better idiots. So far, the Universe is winning. (Rich Cook)
>
> <melt***@hotmail.com> schreef in bericht
> news:1145862785.501159.8480@i40g2000cwc.googlegroups.com...
> > I'm just getting into using datagrid and have a couple of questions.
> >
> > 1.)How do you get the grid to show the values of a datatable
> > automatically?  Currently I have to hit the + sign and then select
> > "getNews"(the datatable) to show my data.
> >
> > 2.)  I have this set up to a loop.  So after I view my grid any updates
> > in the loop causes the datagrid to go blank(ie gray box).
> >
> > Anybody know what I should add to make the datagrid correctly
> > repopulate on every loop?
> >
>
>