By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,685 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

Highlighting the cell data in a datagrid....

P: n/a
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


Nov 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
You can try code as follows:

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

HTH

Elton Wang
el********@hotmail.com

"JohnSmith90" wrote:
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


Nov 19 '05 #2

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

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
You can try code as follows:

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

HTH

Elton Wang
el********@hotmail.com

"JohnSmith90" wrote:
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


Nov 19 '05 #3

P: n/a
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

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

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
You can try code as follows:

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

HTH

Elton Wang
el********@hotmail.com

"JohnSmith90" wrote:
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



Nov 19 '05 #4

P: n/a
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" <El****@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

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

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
You can try code as follows:

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

HTH

Elton Wang
el********@hotmail.com

"JohnSmith90" wrote:

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


Nov 19 '05 #5

P: n/a
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" wrote:
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" <El****@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

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

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
> You can try code as follows:
>
> foreach (DataGridItem item in DataGrid.Items)
> {
> item.Cells[col_index].BackColor = Color.Blue;
> }
>
> HTH
>
> Elton Wang
> el********@hotmail.com
>
>
>
> "JohnSmith90" wrote:
>
> > 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
> >
> >
> >
> >
> >
> >
> >


Nov 19 '05 #6

P: n/a
Awesome.
Thanks for helping me out. I will vote for you MVP title.
Smith
"Elton W" <El****@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
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" wrote:
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" <El****@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
Try
item.Cells[col_index].ForeColor = Color.Blue

HTH

Elton
"JohnSmith90" wrote:

> Thanks for the reply.
> The suggested method highlights the entire cell area. I want to

highlight
> the text only.
> Thanks,
> Smith
>
> "Elton W" <El****@discussions.microsoft.com> wrote in message
> news:E8**********************************@microsof t.com...
> > You can try code as follows:
> >
> > foreach (DataGridItem item in DataGrid.Items)
> > {
> > item.Cells[col_index].BackColor = Color.Blue;
> > }
> >
> > HTH
> >
> > Elton Wang
> > el********@hotmail.com
> >
> >
> >
> > "JohnSmith90" wrote:
> >
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
>
>
>


Nov 19 '05 #7

P: n/a
Thanks
Elton

"JohnSmith90" wrote:
Awesome.
Thanks for helping me out. I will vote for you MVP title.
Smith
"Elton W" <El****@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
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" wrote:
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" <El****@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
> Try
> item.Cells[col_index].ForeColor = Color.Blue
>
> HTH
>
> Elton
>
>
> "JohnSmith90" wrote:
>
> > Thanks for the reply.
> > The suggested method highlights the entire cell area. I want to
highlight
> > the text only.
> > Thanks,
> > Smith
> >
> > "Elton W" <El****@discussions.microsoft.com> wrote in message
> > news:E8**********************************@microsof t.com...
> > > You can try code as follows:
> > >
> > > foreach (DataGridItem item in DataGrid.Items)
> > > {
> > > item.Cells[col_index].BackColor = Color.Blue;
> > > }
> > >
> > > HTH
> > >
> > > Elton Wang
> > > el********@hotmail.com
> > >
> > >
> > >
> > > "JohnSmith90" wrote:
> > >
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >


Nov 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.