GUI of Datagrid

J

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!
 
R

Riki

Javier said:
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
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top