473,803 Members | 3,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4648
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********@hotm ail.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********@hotm ail.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.It em and
ListItemType.Al ternatingItem 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********@hotm ail.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
5309
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 grid-- all I want to do is write to the grid, read from it, and allow the user to enter text in particular cells. Is the WinForms datagrid a viable candidate for this sort of work? If it is, can you recommend a resource to help me get up to...
7
4677
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 quite ugly. The black area is larger then it is once an item is added. How can I solve this problem either by: A) Having only the header black and the rest of the empty block white or gray (preffered solution) B) Having the color gray or white...
5
1878
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. The radiobuttonlists are fine, they size depending on how many item are called into it. However, the datagrids, prior to filling with data contain FIVE "Databound" items and the grid does not shrink if it is filled with only 2 for example....
2
2677
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 (ie. with empty cells). Unfortunatly I get no datagrid shown instead. Any idea how I can force the datagrid to show with an empty row? Best regards,
2
1789
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
2129
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 record, the ComboBoxColumn's Commit event doesn't fire. If the user first edits a TextBox cell on the same New row, and THEN selects a new value for the ComboBox cell, Commit fires. What is going on and how do I get around it Thanks Pat
1
2370
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. -- .. http://sf-f.org, weblog and search engine for fans and writers of
10
8135
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 to have a fixed number of rows regardless of what data is in the bound table? Thanks, Aaron -- --- Aaron Smith
4
2289
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 combobox in a datagrid? Any other suggestions/articles on how to implement many-many relations in the frontend (which of course are 2 one-many relations)?
0
9703
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
10548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10316
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...
0
10069
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
7604
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...
0
6842
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
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
3
2970
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.