DataGrid and colspan Question

N

needin4mation

Hi I am trying to had a colspan to my footer.

I have my DataGrid populating as normal. I then have a footer utilzed
for the insert of new data.

My DataGrid has an Edit Column and a Delete Column.
My footer has an "Insert" column.

I can line everything up right so that Insert fits under Edit, but
there is then an extra cell that is blank in my footer row. This is
because of my delete button.

I tried to do the following:

if (e.Item.ItemType == ListItemType.Footer)
{
e.Item.Cells[6].ColumnSpan=2;
}

This works, almost, except that when it renders it then puts an extra
header and cell on the end of the DataGrid. I can't get rid of it.
All I am trying to do is have my "Insert" button span two columns,
centered underneath my edit and delete buttons.

Thank you for any help.
 
L

Lucas Tam

(e-mail address removed) wrote in @g47g2000cwa.googlegroups.com:
This works, almost, except that when it renders it then puts an extra
header and cell on the end of the DataGrid. I can't get rid of it.
All I am trying to do is have my "Insert" button span two columns,
centered underneath my edit and delete buttons.

You need to hide your other columns and set their .visible property to
false.
 

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

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top