473,385 Members | 1,356 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,385 software developers and data experts.

Need Datagrid help

I'm using a VB.NET datagrid and need a little help on presentation.
When my datagrid comes up it only shows a small plus sign for the user
to click on, then it shows the word 'table' for the user to click on
again, finally the user can see the data. How do I set this to show
the data without the need to click on anything?

Next, the header defaults to "NewDataSet". How do I eliminate the
header?

And lastly, how do I adjust the column widths?
Thanks,
di****@earthlink.net
Jul 21 '05 #1
4 1110
You're probably setting the datasource to a dataset.

set the datasource to the table in the dataset and set the name of the the
table you're filling.

dataadapter.fill(yourdataset, "WhatYouWantDisplayedIfAnything")
yourdatagrid.datasource = yourdataset.tables(0)
OR
yourdatagrid.datasource = yourdataset.tables("WhatYouWantDisplayedIfAnything ")

"Moondog" wrote:
I'm using a VB.NET datagrid and need a little help on presentation.
When my datagrid comes up it only shows a small plus sign for the user
to click on, then it shows the word 'table' for the user to click on
again, finally the user can see the data. How do I set this to show
the data without the need to click on anything?

Next, the header defaults to "NewDataSet". How do I eliminate the
header?

And lastly, how do I adjust the column widths?
Thanks,
di****@earthlink.net

Jul 21 '05 #2
You're probably setting the datasource to a dataset.

set the datasource to the table in the dataset and set the name of the the
table you're filling.

dataadapter.fill(yourdataset, "WhatYouWantDisplayedIfAnything")
yourdatagrid.datasource = yourdataset.tables(0)
OR
yourdatagrid.datasource = yourdataset.tables("WhatYouWantDisplayedIfAnything ")

"Moondog" wrote:
I'm using a VB.NET datagrid and need a little help on presentation.
When my datagrid comes up it only shows a small plus sign for the user
to click on, then it shows the word 'table' for the user to click on
again, finally the user can see the data. How do I set this to show
the data without the need to click on anything?

Next, the header defaults to "NewDataSet". How do I eliminate the
header?

And lastly, how do I adjust the column widths?
Thanks,
di****@earthlink.net

Jul 21 '05 #3
Thanks chris. I knew it was going to be something simple like that.

Dominic Isaia
di****@earthlink.net
Jul 21 '05 #4
Thanks chris. I knew it was going to be something simple like that.

Dominic Isaia
di****@earthlink.net
Jul 21 '05 #5

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

Similar topics

2
by: Roel | last post by:
I need help to format the column and detect any change on the datagrid. My source code is: dim da as SqlDataAdapter dim ds as DataSet dim dtSource as DataTable dim conn as SQLConnection =...
11
by: Junkguy | last post by:
I need some help programmatically causing a row in a DataGrid to "flush" its contents to its bound data (in Visual Studio 6 using Windows Forms with C#). My issue is I want to send an update to...
0
by: MrNobody | last post by:
I am desperately in need of some help to get a summary row for my DataGrid. A summary row is just a row always on the bottom which has totals for certain columns. I have been able to find...
1
by: ericm1155 | last post by:
I am trying to display some information from a database in a form that displays one record per line. When the user clicks anywhere on a line, that record is highlighted and selected, and my program...
1
by: Gidi | last post by:
Hi, I'm looking for a way to do something, and i need help on finding the best way to do it. I've one Form that contains a dataGrid, and one of the buttons in that form, opens another Form...
7
by: Joe | last post by:
Hi, I’m new to asp.net. I want to create an asp.net page that allows user to edit the data. I have pasted my code below. I am able to display the data in a datagrid. At the bottom of the page...
1
by: Anna | last post by:
I have a simple DataGrid that displays a list of characteristics and allows you to edit a description for each characteristic. The query that feeds this involves a join, as the characteristics and...
10
by: Terry Olsen | last post by:
I've got a datagrid set up to display data. I've also got an Edit,Update,Cancel column set up to allow editing of data. I've got a DropDownList (ID="ddl3")in the EditItemTemplate for a certain...
21
by: coleenholley | last post by:
I've been trying since last Friday to get an answer on how to get a SPECIFIC row.cell value from a datagrid. I've had plenty of suggestions, but nothing works to get the value from a SPECIFIC Row...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.