[Mono-bugs] [Bug 632851] New: DataGridView RowStyles not applied on a per row basis
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Aug 19 11:07:31 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=632851
https://bugzilla.novell.com/show_bug.cgi?id=632851#c0
Summary: DataGridView RowStyles not applied on a per row basis
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: Other
OS/Version: openSUSE 11.3
Status: NEW
Severity: Major
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: kin3tik at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Description of Problem:
DataGridView Rowstyles do not apply per row. When the style for a specified row
is set. On the next Paint Event, the style gets applied to all rows in the
DataGridView.
The following code example works under Windows/.net but not under linux/mono:
Applied in the PrePaint event:
if (sj.function_key == (int)TransactionKey.ItemCorrect)
{
if (row.Selected)
{
row.DefaultCellStyle.SelectionBackColor = Color.Orange;
row.DefaultCellStyle.SelectionForeColor = Color.Black;
}
row.DefaultCellStyle.BackColor = Color.Orange;
row.DefaultCellStyle.Font = new Font("Arial", 14F,
System.Drawing.FontStyle.Strikeout, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
}
else if (sj.function_key == (int)TransactionKey.Void)
{
if (row.Selected)
{
row.DefaultCellStyle.SelectionBackColor = Color.Red;
row.DefaultCellStyle.SelectionForeColor = Color.Black;
}
row.DefaultCellStyle.BackColor = Color.Red;
row.DefaultCellStyle.Font = new Font("Arial", 14F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
}
else if (sj.function_key == (int)TransactionKey.ReturnMDSE)
{
if (row.Selected)
{
row.DefaultCellStyle.SelectionBackColor = Color.Red;
row.DefaultCellStyle.SelectionForeColor = Color.Black;
}
row.DefaultCellStyle.BackColor = Color.Red;
row.DefaultCellStyle.Font = new Font("Arial", 14F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
}
Actual Results:
The very 1st time this is set it works correctly consequent calls paints all
the rows with the style set to the last row.
Expected Results:
Each row should have its own row style
How often does this happen?
Every time
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list