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

DataGrid Empty rows

Hi!

I am developing a web project using ASP.NET and VB.NET as code behind. In
one page the user attaches files to the list. The same data is shown in the
and the max records visible is 4. Now the problem is I need to show 4 empty
rows in the datagrid before binding the datagrid to the datasource.

Can anyone help in this regard.

Thanks in advance,

Baren
Nov 19 '05 #1
3 4631
Hi Baren,

Suppose you are using datatable as the datagrid's data
source. Before bind it to datagrid, add four empty rows to
the datatable, then bind it to the datagrid.

HTH

Elton Wang
el********@hotmail.com

-----Original Message-----
Hi!

I am developing a web project using ASP.NET and VB.NET as code behind. Inone page the user attaches files to the list. The same data is shown in theand the max records visible is 4. Now the problem is I need to show 4 emptyrows in the datagrid before binding the datagrid to the datasource.
Can anyone help in this regard.

Thanks in advance,

Baren
.

Nov 19 '05 #2
Hi! Elton,

Thanks for the response. ya i am using a Datatable to bind it... I am just
looking if there is any other option..

Thanks again for the response.
Baren

"Elton Wang" wrote:
Hi Baren,

Suppose you are using datatable as the datagrid's data
source. Before bind it to datagrid, add four empty rows to
the datatable, then bind it to the datagrid.

HTH

Elton Wang
el********@hotmail.com

-----Original Message-----
Hi!

I am developing a web project using ASP.NET and VB.NET as

code behind. In
one page the user attaches files to the list. The same

data is shown in the
and the max records visible is 4. Now the problem is I

need to show 4 empty
rows in the datagrid before binding the datagrid to the

datasource.

Can anyone help in this regard.

Thanks in advance,

Baren
.

Nov 19 '05 #3
Hi Baren,

I believe this is a simple way. For example, you can add
DatagridItems (rows) to the datagrid, but you need add
these item's ItemType as ListItemType.Item and
ListItemType.AlternatingItem alternatively. Apparently,
it's more complicated.

HTH

Elton Wang

-----Original Message-----
Hi! Elton,

Thanks for the response. ya i am using a Datatable to bind it... I am justlooking if there is any other option..

Thanks again for the response.
Baren

"Elton Wang" wrote:
Hi Baren,

Suppose you are using datatable as the datagrid's data
source. Before bind it to datagrid, add four empty rows to the datatable, then bind it to the datagrid.

HTH

Elton Wang
el********@hotmail.com

>-----Original Message-----
>Hi!
>
>I am developing a web project using ASP.NET and VB.NET
as code behind. In
>one page the user attaches files to the list. The
same data is shown in the
>and the max records visible is 4. Now the problem is I

need to show 4 empty
>rows in the datagrid before binding the datagrid to
the datasource.
>
>Can anyone help in this regard.
>
>Thanks in advance,
>
>Baren
>.
>

.

Nov 19 '05 #4

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

Similar topics

3
by: Dave Veeneman | last post by:
I am just getting into the WinForms data grid, and just about everything I am seeing on it seems to say that the grid must be bound to an ADO.Net dataset. I want to use the grid as a simple unbound...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
5
by: Kat | last post by:
Hi, I'm trying to set up an asp.net page using flow layout so I'm putting all my controls into a table grid, etc. I use several radiobuttonlists and datagrids that are generated from datasource....
2
by: carballosa | last post by:
Hi guys, I need to use a one row datagrid in my asp.net 1.1 application. The data source will contain 1 or 0 entries. When no rows of data are present I want to show an empty row in the datagrid...
2
by: tshad | last post by:
I have a Datagrid that has no rows in it, but I want the title to show, and they aren't. Is there a way to make them visible even if the Datagrid is empty? Thanks, Tom
2
by: pmcguire | last post by:
I have derived a ComboBoxColumnStyle that inherits DataGridColumnStyle. It works fine except for one behavior. If the user selects a new value from the ComboBox's pulldown list on a brand new...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
10
by: Aaron Smith | last post by:
If I have a datagrid and the bound data file only have 4 rows in it, the grid will show the 4 rows. However, there is blank space below that until it reaches the bottom of the grid. Is there a way...
4
by: Jan Nielsen | last post by:
Hi all I'm a former Access developer who would like to implement a many-to-many relation in about the same way you do in Access: With a subform and a combo box. Is it possible to use a...
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
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.