473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Highlighting the cell data in a datagrid....

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
7 1843
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Niche | last post by:
I am new to VB.net, I know how to make command buttons and text boxes on a VB form. I need help with writing the code to ope and Excel 97 spreadsheet and place a cell data (A1) into my VB.net...
1
by: Ryan Liu | last post by:
Hi, when I edit a cell in datagrid, I need click on another cell to save the current cell. But when I close the form, the last modified cell is not changed, how can I prevent this? Thanks a...
0
by: Shri | last post by:
hi I have a textbox with multiline = true and wrap = true with maxSize = 2000 Now this data is being saved into a cell of a datagrid I need to adjust the height and width of the cell(of...
1
by: Hans | last post by:
I have a Windows.Forms.Form containing a DataGrid where the DataSource is a DataView. Everything refreshes fine after adding, deleting or editing rows. When I close the dialog and reopen it with a...
2
by: bienwell | last post by:
Hi, Does the OnSelectedIndexChanged event work when we mark on the checkbox on the cell of Datagrid control ? I tried to call this event; it didn't affect anything. Do you know any event that...
3
by: sailu | last post by:
Hi, Anyone knows how can i set the focus to a particular cell in DataGrid. Thanks, Sailaja.
2
by: AnujaManudhane | last post by:
How to the value of cell on datagrid
0
by: bhappy | last post by:
Hi, I am using Flex 3.0 version. Can anyboday have any idea about showing hand symbol on mouseover of any cell in datagrid? Please provide me any sample code or links. Thanks in Advance,...
2
by: Ghayas | last post by:
Hello, its quite strange that i m itearing a gridview to get some of its cell data but its not show me data, i m doing like this for i=0 to GView.rows.count-1 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.