DataGrid Empty rows

G

Guest

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
 
E

Elton Wang

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
(e-mail address removed)
 
G

Guest

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
 
E

Elton Wang

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top