Click here to Skip to main content
15,890,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Switch-Case sample Pin
Pete O'Hanlon22-May-18 23:40
mvePete O'Hanlon22-May-18 23:40 
AnswerRe: Switch-Case sample Pin
#realJSOP24-May-18 3:35
mve#realJSOP24-May-18 3:35 
QuestionHow to insert image into merged cell. (ClosedXML) Pin
Member 1379545720-May-18 14:11
Member 1379545720-May-18 14:11 
SuggestionRe: How to insert image into merged cell. (ClosedXML) Pin
Maciej Los21-May-18 20:41
mveMaciej Los21-May-18 20:41 
QuestionTriggering a cellformatting event of a datagridview Pin
leone19-May-18 10:21
leone19-May-18 10:21 
AnswerRe: Triggering a cellformatting event of a datagridview Pin
Maciej Los21-May-18 20:44
mveMaciej Los21-May-18 20:44 
Questioncoloring a cell via datagridview cellformatting event Pin
leone19-May-18 10:11
leone19-May-18 10:11 
AnswerRe: coloring a cell via datagridview cellformatting event Pin
Luc Pattyn19-May-18 12:04
sitebuilderLuc Pattyn19-May-18 12:04 
Hi,

DataGridView may well be the most complex Control in the entire WinForms universe.
Cells have a DefaultStyle and a Style.
First row and/or first column may have different behavior (e.g. for column headers).

IMHO inside the CellFormatting handler you are expected to only alter the Value and the CellStyle fields of the DataGridViewCellFormattingEventArgs that is passed to you, and both apply to the cell that is invoking the handler.

If you need more than that, I'm afraid you may need to use explicitly created DataGridViewCellStyle objects for each cell you may want to alter the style of. You may want to start reading here: Cell Styles in the Windows Forms DataGridView Control | Microsoft Docs[^]

Anyhow, it may take quite some experimentation to tame the beast.

Smile | :)

PS: if you don't have column headers right now, the easiest way out could well be to add them; that way you dont have actual data in row zero!
Luc Pattyn [My Articles] Nil Volentibus Arduum

AnswerRe: coloring a cell via datagridview cellformatting event Pin
OriginalGriff19-May-18 19:55
mveOriginalGriff19-May-18 19:55 
AnswerRe: coloring a cell via datagridview cellformatting event Pin
leone24-May-18 11:13
leone24-May-18 11:13 
QuestionI want to read a value from a gridview cell using button event, something i'm not getting right here. Pin
Ngqulunga19-May-18 2:02
Ngqulunga19-May-18 2:02 
Questioni need to save me textbox data to separate line in notepad Pin
Mohamed Fahad M18-May-18 23:41
Mohamed Fahad M18-May-18 23:41 
AnswerRe: i need to save me textbox data to separate line in notepad Pin
OriginalGriff18-May-18 23:59
mveOriginalGriff18-May-18 23:59 
AnswerRe: i need to save me textbox data to separate line in notepad Pin
Dave Kreskowiak20-May-18 5:33
mveDave Kreskowiak20-May-18 5:33 
QuestionMy code is not calculating correctly... I just need an extra pair of eyes to help me see what I am missing. Please help Pin
Member 1383451318-May-18 21:59
Member 1383451318-May-18 21:59 
AnswerRe: My code is not calculating correctly... I just need an extra pair of eyes to help me see what I am missing. Please help Pin
OriginalGriff18-May-18 22:00
mveOriginalGriff18-May-18 22:00 
AnswerRe: My code is not calculating correctly... I just need an extra pair of eyes to help me see what I am missing. Please help Pin
Richard MacCutchan18-May-18 23:45
mveRichard MacCutchan18-May-18 23:45 
AnswerRe: My code is not calculating correctly... I just need an extra pair of eyes to help me see what I am missing. Please help Pin
Implements Master Yoda21-May-18 4:34
Implements Master Yoda21-May-18 4:34 
QuestionQuestion in principal regarding writing an Outlook Plugin Pin
Jim60718-May-18 0:35
Jim60718-May-18 0:35 
AnswerRe: Question in principal regarding writing an Outlook Plugin Pin
Eddy Vluggen18-May-18 1:23
professionalEddy Vluggen18-May-18 1:23 
GeneralRe: Question in principal regarding writing an Outlook Plugin Pin
Jim60718-May-18 1:39
Jim60718-May-18 1:39 
GeneralRe: Question in principal regarding writing an Outlook Plugin Pin
Eddy Vluggen18-May-18 13:13
professionalEddy Vluggen18-May-18 13:13 
AnswerRe: Question in principal regarding writing an Outlook Plugin Pin
Gerry Schmitz18-May-18 8:14
mveGerry Schmitz18-May-18 8:14 
QuestionApp pool is crashing due to memory leakage Pin
Anoop Mehra17-May-18 18:22
Anoop Mehra17-May-18 18:22 
GeneralRe: App pool is crashing due to memory leakage Pin
Randor 17-May-18 18:45
professional Randor 17-May-18 18:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.