This is great information but how would i do this based and a certain row.
For instance, what if I wanted Row 6 Cell 0 formatted differently from other
cells?
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:...
> nothing to it. you would need to put the appropriate code in the
> itemcreated, or itemdatabound event handler. Every time a row is created,
it
> fires off an event. trap the above event and use the datagrideventargs e
to
> customize.
> something like this will work
> if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
> ListItemType.AlternatingItem || e.Item.ItemType ==
> ListItemType.SelectedItem)
>
> {
>
> //catch the first row and span column zero over the next three columns
>
> e.Item.Cells[0].RowSpan = 4
>
> }
>
> "Larry Dodd" <> wrote in message
> news:#...
> > I want to be able to change some properties of certain cells on the
> > datagrid. For instance, let's say the datagrid has 10 rows and 5
columns.
> I
> > want the first five rows to be normal but on the 6th through 10th row. I
> was
> > the first two columns to have a background in the cell that is gray.
> >
> > Even better would be to have the first two columns on the 6th through
10th
> > row to span two columns. I have included a small example below. Any help
> on
> > either of these problems would be appreciated.
> >
> > ---------------------------------
> > | | | | | |
> > ---------------------------------
> > | | | | | |
> > ---------------------------------
> > | | | | | |
> > ---------------------------------
> > | | | | |
> > ---------------------------------
> > | | | | |
> > ---------------------------------
> > | | | | |
> >
> >
>
>
|