Home All Groups Group Topic Archive Search About
Author
25 Feb 2005 12:46 PM
Javier Pérez
Hello All,

Aplogise my english, im a spanish speaker. If you want, you can response me
in spainsh.

Ive got a dataGrid where one their columns is a bit type. I would like where
one of this columns was true, the background color change to red color.

I tried to do this, but no way...

------------------------------------------------------------------------------------------------------



Create the event
    this.dtgSortAndPaging.ItemDataBound += new
    DataGridItemEventHandler(dtgSortAndPaging_ItemDataBound);


Create the function:
private void dtgSortAndPaging_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)

{
How I can work with de background propertie of de datagrid and change his
color??
}


Thanks!

Author
25 Feb 2005 5:37 PM
Riki
Javier Pérez wrote:
Show quoteHide quote
> Hello All,
>
> Aplogise my english, im a spanish speaker. If you want, you can
> response me in spainsh.
>
> Ive got a dataGrid where one their columns is a bit type. I would
> like where one of this columns was true, the background color change to
> red
> color.
> I tried to do this, but no way...
>
> ------------------------------------------------------------------------------------------------------
>
>
>
> Create the event
>    this.dtgSortAndPaging.ItemDataBound += new
>    DataGridItemEventHandler(dtgSortAndPaging_ItemDataBound);
>
>
> Create the function:
> private void dtgSortAndPaging_ItemDataBound(object sender,
> System.Web.UI.WebControls.DataGridItemEventArgs e)
>
> {
> How I can work with de background propertie of de datagrid and change
> his color??
> }
>
>
> Thanks!

e.Item.BackColor=System.Drawing.Color.Red

--

Riki