473,327 Members | 1,919 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,327 software developers and data experts.

Changing a color of row in datagrid

Hi all,
Is it possible to change a bgColor of a row in a datagrid ?. I am developing
a windows form based application.

Please let me know

TIA,
Kishor.
Nov 20 '05 #1
3 963
Cor
Hi Kishor,

In a lot of ways

even automatic row by row using the alternatingbackground
or by using selectionbackground property

It can also in the styles

I hope this helps?

Cor
Is it possible to change a bgColor of a row in a datagrid ?. I am developing a windows form based application.

Nov 20 '05 #2
Hi Cor,

Thanx for your immediate reply, Please see here what I am looking.

I am havig a datagrid on one windows form.. I have populated the grid with
proper data. Presently it is displaying the data in default white color.
Depends on the content in cell I wanted to change the color of the grid.

Lets assume for Example I am having a list of cities in grid along with
sales fig.

If sales fig is less than 100 then the full row should be in some different
color. How do I achieve this.

If you have any Solution please let me know. Any sample code will do.

Regards and thanks.

Kishor
"Cor" <no*@non.com> wrote in message
news:uy**************@TK2MSFTNGP12.phx.gbl...
Hi Kishor,

In a lot of ways

even automatic row by row using the alternatingbackground
or by using selectionbackground property

It can also in the styles

I hope this helps?

Cor
Is it possible to change a bgColor of a row in a datagrid ?. I am

developing
a windows form based application.


Nov 20 '05 #3
Hi,

http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q745q

Ken
---------------
"Kishor" <Kp***@hotmail.com> wrote in message
news:u%****************@TK2MSFTNGP09.phx.gbl...
Hi Cor,

Thanx for your immediate reply, Please see here what I am looking.

I am havig a datagrid on one windows form.. I have populated the grid with
proper data. Presently it is displaying the data in default white color.
Depends on the content in cell I wanted to change the color of the grid.

Lets assume for Example I am having a list of cities in grid along with
sales fig.

If sales fig is less than 100 then the full row should be in some
different
color. How do I achieve this.

If you have any Solution please let me know. Any sample code will do.

Regards and thanks.

Kishor
"Cor" <no*@non.com> wrote in message
news:uy**************@TK2MSFTNGP12.phx.gbl...
Hi Kishor,

In a lot of ways

even automatic row by row using the alternatingbackground
or by using selectionbackground property

It can also in the styles

I hope this helps?

Cor
> Is it possible to change a bgColor of a row in a datagrid ?. I am

developing
> a windows form based application.
>



Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mvargasp | last post by:
Hi all, I have a web form which contains a frame, (a form containing a menu on the left and a web form containing a datagrid on the right). Also there is a button (right side) which transforms...
1
by: Amos | last post by:
Can I add a column to the datagrid and also resize it? I add them like this: DataTableAddress.Columns.Add("Col1", typeof(string)); DataTableAddress.Columns.Add("Col2", typeof(string));...
1
by: Shawn Benson | last post by:
I have a Windows form where a user enters an order number which returns a dataset that is bound to a datagrid. The problem is when a user clicks on a cell in the datagrid, then enters another...
3
by: Doug | last post by:
Hi I have the following code (not mine) that populates a datagrid with some file names. But I want to replace the datagrid with a combo box. private void OnCurrentDataCellChanged(object sender,...
1
by: Simon Harris | last post by:
Hi All, Ok, I have 6 datagrids, populated from 1 dataset. Each datagrid has 3 columns. There are 18 columns in the dataset. I have written a sub to change the background colour of the row in...
2
by: david | last post by:
Problem: There is a search button, Search, in form, for searching patient info list. The error occurs after the following steps: 1. search first time is OK, and all found the records are...
1
by: Anup | last post by:
Hi group, I m using protected System.Web.UI.WebControls.DataGrid (ASP.NET 1.x) I have set the "pager style mode" to "NumericPages" with "AllowingPaging=true"
1
by: Veeves | last post by:
I would like to change the width of a datagrid column at run time. I have noticed when creating a datagrid, if the header text is shorter than the data in the column, then the column width set by...
1
by: Steve | last post by:
C# WinForms I am trying to find a good solution for changing the color of a row in a datagrid, at runtime, based on the contents of a certain cell of the row, or a related value in the database....
1
by: Blasting Cap | last post by:
I am having trouble changing the font for a PushButton control in a datagrid button column. I have seen several posts refer to styles and simple changes to the HTML for font changes but most of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.