473,748 Members | 8,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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"(t he 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 1108
Hi,

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

2) Post some code

Ken
----------
<me*****@hotmai l.com> wrote in message
news:11******** ************@i4 0g2000cwc.googl egroups.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"(t he 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.dataso urce = myDataSet.table s(0)
2) datagrid.refres h

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*****@hotmai l.com> schreef in bericht
news:11******** ************@i4 0g2000cwc.googl egroups.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"(t he 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******** ******@TK2MSFTN GP03.phx.gbl...
1) datagrid.dataso urce = myDataSet.table s(0)
2) datagrid.refres h

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*****@hotmai l.com> schreef in bericht
news:11******** ************@i4 0g2000cwc.googl egroups.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"(t he 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
3369
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 DateTime picker functioning quite well in the datagrid. I am also tracking a double-click event within another column in the datagrid. The column is just text. When the double-click event trigger fires, I load a borderless form, from which a user...
5
1474
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 sets it up previously). The questions are in a db. Is a datagrid the best way to display this data? What do you suggest? After they enter the info I want to be able to save it back to the db. Any helpful links/examples?
4
1195
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 to a text and was not able to by using txtEmp.setfocus(). I read somewhere that this may not be possible, is that true? 3. When you sign on to my web page that I am making and go to type something into the textboxes, dropdown boxes with...
3
985
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? 2) Is there a way to adjust the individual column widths of a DataGrid which has no TableStyles or GridColumnStyles? Also, is there a way to make it impossible for the user to resize the columns and rows?
5
1144
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 that same column align-left?
10
4951
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 the column order of the datatable). I also allow the user to click on a column header to sort the datagrid by that column. I need to identify the row and column in the datatable when the user clicks on a cell in the datagrid. Using the...
0
1266
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 from a datatable and enable it to allow edits as well.
9
2128
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 datagrid control, i used the Caption property. It displays fine on the datagrid and allows me to run the program. But, when i view the HTML for the web form, it shows this error at the
9
2726
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 code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9374
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
9325
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
9249
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...
1
6796
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...
1
3315
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
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.