[Mono-bugs] [Bug 479405] New: DataView RowFilter display abnormal in mono, but .net ok
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Feb 25 02:59:18 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=479405
Summary: DataView RowFilter display abnormal in mono, but .net
ok
Classification: Mono
Product: Mono: Runtime
Version: 2.2.x
Platform: i586
OS/Version: openSUSE 11.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: generics
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: tsai at pinnacle.com.tw
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=275236)
--> (https://bugzilla.novell.com/attachment.cgi?id=275236)
visual studio project source
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.6)
Gecko/2009011913 Firefox/3.0.6
dataGridView1.DataSource = MakeDataTable(); // generate DataTable with 10
records
DataView view = ((DataTable)dataGridView1.DataSource).DefaultView;
view.RowFilter = "Qty>=3 and Qty<=8"; // filter 3 records
DataGridView display ok (records is 7) in .net,
but mono (2.0.1 and 2.2) on SUSE 11.1 abnormal (RowFilter not active so records
is 10).
namespace MonoBug
{
public partial class MonoBug : Form
{
bool inFilter = false;
private void button2_Click(object sender, EventArgs e) // bug
{
DataView view = ((DataTable)dataGridView1.DataSource).DefaultView;
if (inFilter)
view.RowFilter = "";
else
view.RowFilter = "Qty>=3 and Qty<=8";
// run in .net ok, but mono (2.0.1 and 2.2) on SUSE 11.1 abnormal
// visual studio 2005 complier on windows XP
// dataGridView1.Invalidate();
inFilter = !inFilter;
}
public MonoBug()
{
InitializeComponent();
dataGridView1.ReadOnly = true;
dataGridView1.AllowUserToAddRows = false;
dataGridView1.DataSource = MakeDataTable(); ;
}
private DataTable MakeDataTable()
{
DataTable table = new DataTable();
DataColumn column = new DataColumn();
column.DataType = System.Type.GetType("System.String");
column.Caption = "Item";
column.ColumnName = "Item";
table.Columns.Add(column);
column = new DataColumn();
column.DataType = System.Type.GetType("System.Decimal");
column.Caption = "Qty";
column.ColumnName = "Qty";
table.Columns.Add(column);
DataRow row;
for (int i = 1; i <= 10; i++)
{
row = table.NewRow();
row["Item"] = "Item " + i.ToString();
row["Qty"] = i;
table.Rows.Add(row);
}
return table;
}
}
}
Reproducible: Always
Steps to Reproduce:
1. run MonoBug.exe in openSUSE
2. press bug button
3. in .net DataGridView records is 7, but in mono records is 10 (Error)
--
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