Highlighting the cell data in a datagrid....

J

JohnSmith90

I want to highlight the entire cell data for all rows of a particular column
in a data grid.

I do not want to fill the back ground color of the cell. How to do that in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 
G

Guest

You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)
 
J

JohnSmith90

Thanks for the reply.
The suggested method highlights the entire cell area. I want to highlight
the text only.
Thanks,
Smith

Elton W said:
You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)



JohnSmith90 said:
I want to highlight the entire cell data for all rows of a particular column
in a data grid.

I do not want to fill the back ground color of the cell. How to do that in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 
G

Guest

Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

Elton


JohnSmith90 said:
Thanks for the reply.
The suggested method highlights the entire cell area. I want to highlight
the text only.
Thanks,
Smith

Elton W said:
You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)



JohnSmith90 said:
I want to highlight the entire cell data for all rows of a particular column
in a data grid.

I do not want to fill the back ground color of the cell. How to do that in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 
J

JohnSmith90

It is changing the color of the text.
I want something like, highlighting the text and not the entire cell.
<td colspan='3'><font face='Verdana' size='1'><B><span
style='background-color: #FFFF00'>My text</span></font></B></td>

Thanks,
smith

Elton W said:
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

Elton


JohnSmith90 said:
Thanks for the reply.
The suggested method highlights the entire cell area. I want to highlight
the text only.
Thanks,
Smith

Elton W said:
You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)



:

I want to highlight the entire cell data for all rows of a
particular
column
in a data grid.

I do not want to fill the back ground color of the cell. How to do
that
in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 
G

Guest

1) create a CSS class then

item.Cells[col_index].CssClass = cssClass

or
2) item.Cells[col_index].Text = "<font face='Verdana' size='1'><B><span
style='BACKGROUND-COLOR: #ffff00'>" + item.Cells[col_index].Text +
"</B></span></font>"


JohnSmith90 said:
It is changing the color of the text.
I want something like, highlighting the text and not the entire cell.
<td colspan='3'><font face='Verdana' size='1'><B><span
style='background-color: #FFFF00'>My text</span></font></B></td>

Thanks,
smith

Elton W said:
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

Elton


JohnSmith90 said:
Thanks for the reply.
The suggested method highlights the entire cell area. I want to highlight
the text only.
Thanks,
Smith

You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)



:

I want to highlight the entire cell data for all rows of a particular
column
in a data grid.

I do not want to fill the back ground color of the cell. How to do that
in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 
J

JohnSmith90

Awesome.
Thanks for helping me out. I will vote for you MVP title.
Smith


Elton W said:
1) create a CSS class then

item.Cells[col_index].CssClass = cssClass

or
2) item.Cells[col_index].Text = "<font face='Verdana' size='1'><B><span
style='BACKGROUND-COLOR: #ffff00'>" + item.Cells[col_index].Text +
"</B></span></font>"


JohnSmith90 said:
It is changing the color of the text.
I want something like, highlighting the text and not the entire cell.
<td colspan='3'><font face='Verdana' size='1'><B><span
style='background-color: #FFFF00'>My text</span></font></B></td>

Thanks,
smith

Elton W said:
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

Elton


:

Thanks for the reply.
The suggested method highlights the entire cell area. I want to highlight
the text only.
Thanks,
Smith

You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)



:

I want to highlight the entire cell data for all rows of a particular
column
in a data grid.

I do not want to fill the back ground color of the cell. How to
do
that
in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 
G

Guest

Thanks
Elton

JohnSmith90 said:
Awesome.
Thanks for helping me out. I will vote for you MVP title.
Smith


Elton W said:
1) create a CSS class then

item.Cells[col_index].CssClass = cssClass

or
2) item.Cells[col_index].Text = "<font face='Verdana' size='1'><B><span
style='BACKGROUND-COLOR: #ffff00'>" + item.Cells[col_index].Text +
"</B></span></font>"


JohnSmith90 said:
It is changing the color of the text.
I want something like, highlighting the text and not the entire cell.
<td colspan='3'><font face='Verdana' size='1'><B><span
style='background-color: #FFFF00'>My text</span></font></B></td>

Thanks,
smith

Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

Elton


:

Thanks for the reply.
The suggested method highlights the entire cell area. I want to
highlight
the text only.
Thanks,
Smith

You can try code as follows:

foreach (DataGridItem item in DataGrid.Items)
{
item.Cells[col_index].BackColor = Color.Blue;
}

HTH

Elton Wang
(e-mail address removed)



:

I want to highlight the entire cell data for all rows of a
particular
column
in a data grid.

I do not want to fill the back ground color of the cell. How to do
that
in a
data grid?



<span style='background-color: #FFFF04'>highlighted Text</span>

I am using .Net Frame work 1.1 and IE5.+.

Thank you very much for the reply.

Smith
 

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

Top