 |
|
 |
Hi Mazdak,
Many thanks for this article, it did the trick for me.
However, I have a question: in the example source code, in the two Paint voids, there is mention of a boolean AlignToRight. What does this do ?
I have made my own version in vb.net but for some reason the Alignment property does not work for me. I was wondering whether this can also be influenced in the Paint voids somehow.
Cheers,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
 |
|
 |
in datagrid there is one column name"EndDate"which comes from Access database.
i want to change the color of rows whose EndDate value is less than or equal to todays system date in C#.
please help me soon
|
|
|
|
 |
|
 |
if you want to change the back and fore colours, just get the Style member of the cell and set the back and fore colours as required.
DataGridViewCell.Style.BackColor and DataGridViewCell.Style.ForeColor
I captured the CellEnter and CellLeave events to trigger the the validation of the data and colour the cells accordingly.
|
|
|
|
 |
|
 |
Hi all,
Please show me how to fill color for one cell in datagrid with vb.net!
|
|
|
|
 |
|
 |
hi all.i want change background color in any row but i can't please help me
|
|
|
|
 |
|
 |
I just wanted to thank you for providing this code. I needed to change the text color based on thresholds in my datagrid and your code let me to the answer. Few say thanks so I thought I would.
THANK YOU!!!!!!!!!!!!!!!
David Bowlby
|
|
|
|
 |
|
 |
How do I change the way default keys works
I want Enter to go Right for example.
|
|
|
|
 |
|
 |
first of all keep it up!!
well, i am also doing the similar type of project module.
but in my module, instead of highlighting the datagrid cell, i have to highlight only the text portion of the datagrid cell according to the word that is searched for.
i am able to highlight only the cell as a whole.
can we modify this code so that it could support only for highlighting the text part only.
i hope u could give me the suggestion on this.
Anur Rs
|
|
|
|
 |
|
 |
Hello! Every body. I run into this error and would like to get your help.
I got a Type is not defined compile error on following ColumnStyle.
Dim GridDelColumn As DataGridColumnStyle
GridDelColumn = New ColumnStyle(pcol("account"))
I added the ColumnStyle.cs public class into my project, and try to instantiate it from my vb form.
I cannot set a reference to it because it is not a dll/ocx file. Neither can I import it. I have it under the same namespace. So I don't understand why the vb form cannot call the c# object.
I have converted the calling part of the code from c# to vb, but I don't think that is the problem.
Thanks a lot.
|
|
|
|
 |
|
 |
How do I change the cell color but according to another cell value ?
I would like to change B cell color if in A cell I have "true".
Thanks for help.
|
|
|
|
 |
|
|
 |
|
 |
let say i have an array of values
i want to color each cells that maches value in array
any ideas how can i do it?
|
|
|
|
 |
|
 |
Hi all,
Do you know if there is any way to do the same thing on the .NET Compact Framework. I'm not holding out much hope, when I try to use this method I get the message
'DataGridColoredTextBoxColumn.Paint(System.Drawing.Graphics, System.Drawing.Rectangle, System.Windows.Forms.CurrencyManager, int, System.Drawing.Brush, System.Drawing.Brush, bool)': no suitable method found to override
I'm trying to implement this on a Windows CE .NET 4.1 device.
Thanks for any help,
Jonathan
|
|
|
|
 |
|
 |
Hi!
Did you get help
or do you have a solution?
Thanks
Martin Pachinger
martin.pachinger@siemens.com
|
|
|
|
 |
|
 |
I found that on the compact framework you're typically a lot easier off using a ListView with a 'Details' view. This lets you specify the row color per item and offers some more control over the list itself to boot.
Hope this late reply is still of help to someone
|
|
|
|
 |
|
 |
Hi,
I have just posted an article at http://www.codeproject.com/useritems/GridSample.asp that works very well with the Compact Framework and allows complete access to the cell contents so formatting can be applied using any 'logic' you can think up and you can format individual cells.
Steve Hayles
steve@grib.us
Steve Hayles
GRIB.US
Experts in Digital Weaher Foercasting
|
|
|
|
 |
|
 |
greeting 2 everyone !
I was wondering...is it possible to add the row dinamicly
e.g. I have datagrid with 4 row and 4 columns binded to the table.
And at the end I would like to add the last summary row that only has 2 columns (One for
label "TOTAL" and the other for summary field)
|
|
|
|
 |
|
 |
Hi, I think it is great . But I can't try to change value of Cell, Column and Row.Can you tell me how to do that.
Thanks a lot
|
|
|
|
 |
|
 |
Sorry for delay. If I understand your question correctly this is the way:
mydatagrid[rowindex,columnindex] = value;
<html>Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
<html>
|
|
|
|
 |
|
 |
I'm sorry if made you misunderstand.
I understand, but you do it in the code,and I mean , when this program run , user(or I) can't change value that is in the colored column,
Ex: I want to click on grid[0,1] and change it to True, I can't do it
but on column 1, I can do it.
so, I tried to color column 1 and uncolor column 2. After that, column1 can't change value and column 2 can do.
Thank you for your help.
Thuy Nhan
|
|
|
|
 |
|
 |
Is it possible to highlight all the cells in a column? Lets say the user double clicks (or some other action) on the column head. Similar to highlighting an entire column in Excel.
Thank you
M
|
|
|
|
 |
|
 |
Hai ,
Your article is superb.
I have two doubt.
1)Can we add a button column in win form datagrid
2)Can we remove the ow select column of a win form datagrid
|
|
|
|
 |
|
 |
Now, depending on a single value in the row ( say a cell value is true ) .. How do i change the look of the entire row.
I couldnt find anything that would specifically allow me to access a particular row in a datagrid.
any help .. as alwayz highly appreciated
|
|
|
|
 |
|
 |
referring to what I know,thats not possible in this way. There is a datagrid in CP in C# control part,I think that guy do it.You can check that article.If you couldn't find the article tell me and I'll tell it to you.
<html>Mazy</html>
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
 |
|
 |
I cant find that article u were talking abt, can u help?
|
|
|
|
 |