473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

A couple of easy datagrid questions

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?

Apr 24 '06 #1
3 1079
Hi,

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

2) Post some code

Ken
----------
<me*****@hotmail.com> wrote in message
news:11********************@i40g2000cwc.googlegrou ps.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?

Apr 24 '06 #2
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)

<me*****@hotmail.com> schreef in bericht
news:11********************@i40g2000cwc.googlegrou ps.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?

Apr 24 '06 #3
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)

"Peter Proost" <pp*****@nospam.hotmail.com> schreef in bericht
news:#s**************@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)

<me*****@hotmail.com> schreef in bericht
news:11********************@i40g2000cwc.googlegrou ps.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?


Apr 24 '06 #4

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

Similar topics

3
by: Dmitry Akselrod | last post by:
Hi, I am using a standard .NET 1.0 Datagrid. Actually, I am using two, bound to a master-detail relationship. Both DataGrids are bound to a datasource. I have the MSDN version of the...
5
by: VB Programmer | last post by:
I have an ASP.NET form that allows people to answer survey questions. There could be from 5 to an unlimited amt of questions, depending on which questions the admin wants to users to answer (he...
4
by: Sccr18 | last post by:
I just have a couple of easy questions: 1. In Asp.net using Vb is there a way to list all the possible characters without listing them all like Char() = "abc..."? 2. I was trying to set the focus...
3
by: jy836 | last post by:
1) When using images for an application (such as in an ImageList or as the image for a button), are the images embedded in the application or must the image files be included in the setup package?...
5
by: EdB | last post by:
1) How do I make the contents of a Windows datagrid editable while at the same time preventing new rows from being added? 2) How do I align the contents of a column align-right, but the header of...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
0
by: Newish | last post by:
Hi Couple of questions on datagrid 1) Is there a performance issue when using datagrid to display data from a datatable. 2) Is there a security issue when using datagrid to display data...
9
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. For a...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
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,...
0
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...

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.