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

Datagrid help

I have a datagrid and have a dataset for a data source in
the properties for the datagrid. I used the property
builder to set columns, and have a table set for the data
member. I also have a connection to an SQL database. For
the columns I am able to select those from the table and
they do show up in the design window. when I run the
application nothing shows up for the datagrid. If anyone
can help,Thanks Paul.
Nov 18 '05 #1
4 928
Please post your code.

"Paul" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
I have a datagrid and have a dataset for a data source in
the properties for the datagrid. I used the property
builder to set columns, and have a table set for the data
member. I also have a connection to an SQL database. For
the columns I am able to select those from the table and
they do show up in the design window. when I run the
application nothing shows up for the datagrid. If anyone
can help,Thanks Paul.

Nov 18 '05 #2
Paul wrote:
I have a datagrid and have a dataset for a data source in
the properties for the datagrid. I used the property
builder to set columns, and have a table set for the data
member. I also have a connection to an SQL database. For
the columns I am able to select those from the table and
they do show up in the design window. when I run the
application nothing shows up for the datagrid. If anyone
can help,Thanks Paul.


Did you remember to call .DataBind() on your grid? You have to tell it
when you are set to bind the data to the grid, by doing this call in
your code.

--
Craig Deelsnyder
Microsoft MVP - ASP.NET
Nov 18 '05 #3
Hi thanks for the quick response. I have not added
anything in the code related to the datagrid. Where and
how do you call .DataBind() on your grid? Is this done in
the code with the page load at
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

End Sub
Thanks again, Paul.
-----Original Message-----
Paul wrote:
I have a datagrid and have a dataset for a data source in the properties for the datagrid. I used the property
builder to set columns, and have a table set for the data member. I also have a connection to an SQL database. For the columns I am able to select those from the table and they do show up in the design window. when I run the
application nothing shows up for the datagrid. If anyone can help,Thanks Paul.
Did you remember to call .DataBind() on your grid? You

have to tell itwhen you are set to bind the data to the grid, by doing this call inyour code.

--
Craig Deelsnyder
Microsoft MVP - ASP.NET
.

Nov 18 '05 #4
Hi, I did not add anycode associated with the data grid as
I thought just by setting the properties it should
populate when you run the app. Do you know if you are
supposed to add code in the page load subroutine to get
the data to show up?

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
-----Original Message-----
Please post your code.

"Paul" <an*******@discussions.microsoft.com> wrote in messagenews:06****************************@phx.gbl...
I have a datagrid and have a dataset for a data source in the properties for the datagrid. I used the property
builder to set columns, and have a table set for the data member. I also have a connection to an SQL database. For the columns I am able to select those from the table and
they do show up in the design window. when I run the
application nothing shows up for the datagrid. If anyone
can help,Thanks Paul.

.

Nov 18 '05 #5

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

Similar topics

3
by: Stephen | last post by:
I've got a datagrid with a remove button and I would like to add some code in the code behind page so as whenthe button is clicked the corresponding row in the datagrid is removed. The Datagrid is...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
3
by: Ryan Liu | last post by:
Hi there, I got a NullReferenceException when delete last row in a datagrid. I had hard time to solve since it does not occur in my own code. I put a datagrid in my inherited user control,...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
0
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a...
5
by: Genojoe | last post by:
I am using code from Help with two exceptions. (1) I increased the number of sample rows from 3 to 20, and (2) I anchored the datagrid to bottom of form so that I can change the size of the grid by...
14
by: Brett Sinclair | last post by:
Hello everybody I'm still on the learning curve here...and from what I read, I created inherited datagrid class so I could have icons, combobox...etc in the columns of my datagrid. The grid...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with 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...
10
by: amiga500 | last post by:
Hello, I have one basic simple question. When I have multiple records in the datagrid as follows: Code Product 1 Product 2 Product 3 11111 A B C...
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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.