[Mono-bugs] [Bug 424917] DataGrid shouldn't show new row when DataView.AllowNew = false

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 4 10:57:42 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=424917

User calberto.cortez at gmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=424917#c2


Carlos Alberto Cortez <calberto.cortez at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |calberto.cortez at gmail.com
         Resolution|                            |NORESPONSE




--- Comment #2 from Carlos Alberto Cortez <calberto.cortez at gmail.com>  2009-08-04 08:57:41 MDT ---
I tried the next sample, using BindingSource, which gives us direct acces to
AllowNew, as opposed to DataTable, and it shows we are working the right way.

using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

public class Test
{
        static void Main (string [] args)
        {
                Application.EnableVisualStyles ();
                TestForm form = new TestForm ();
                Application.Run (form);
        }

}

public class TestForm : Form
{
        public TestForm ()
        {
                DataGrid data_grid = new DataGrid ();
                DataTable table = new DataTable ();
                table.Columns.Add ("Name", typeof (string));

                BindingSource binding_source = new BindingSource ();
                binding_source.DataSource = table;
                binding_source.AllowNew = false;
                data_grid.DataSource = binding_source;

                Controls.AddRange (new Control [] { data_grid });
        }
}

So, since the report is so old, I'm going to close it for now. Feel free to
re-open if you bring a test case which shows the issue. Thanks!

-- 
Configure bugmail: http://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