Click here to Skip to main content
15,894,182 members

Comments by Jamie888 (Top 200 by date)

Jamie888 29-Apr-22 4:55am View    
4. I tried to put alert('trigger here'); inside the if (e.sender.items().length == 1){}. It prompted but not executing the this.select(0);
Jamie888 4-Aug-21 4:50am View    
The error happened at the .Select()
Jamie888 4-Aug-21 4:49am View    
The error is "IGrouping<string> does not contain a definition for "ID" and no accessible extension method "ID" accepting a first argument of type...."
Jamie888 2-Jul-21 2:07am View    
.Cells[1] is the column I want to have as the main column for users to concentrate on. Thus .Cells[1] is used.
Jamie888 2-Jul-21 2:06am View    
Hello @OriginalGriff, thank you for the explanation. I have looked into other articles too and after I have added/modify the codes:
1. dgvRow.ReadOnly = true;
2. Font f = new Font(dgvRow.Cells[1].InheritedStyle.Font.Name, dgvRow.Cells[1].InheritedStyle.Font.Size, FontStyle.Italic);
dgvRow.DefaultCellStyle.Font = f;

It is working. The rows' style did not get overwritten anymore. I am still studying on why these 2 lines would do the tricks.
I would definitely look into your suggestion too. They might be a more complete solution than what I have.

Thank you.