[Mono-winforms-list] DataGridView binding not working

marcos b marcosb at internet.com.uy
Tue Dec 2 06:53:51 EST 2008


I have a datatable binded to a DataGridView.
When I add a record in the gridview a row is added to the datatable when
running in .net environment, but no row is added when running in mono.
I didn't try, but I supose that edit, and delete actions in the gridview do
not affect the datatable neither.

Is it a known bug? When is it going to be fixed?

I paste the code of my form below. The form only has a DataGridView named
dataGridView1 and a button

    public partial class DataGridViewTest : Form
    {
        DataTable dt = new DataTable();
        public DataGridViewTest()
        {
            InitializeComponent();
        }

        private void btnNumberOfRows_Click(object sender, EventArgs e)
        {
            MessageBox.Show(dt.Rows.Count.ToString());            
        }

        private void DataGridViewTest_Load(object sender, EventArgs e)
        {
            dt.Columns.Add("Key");
            dt.Columns.Add("Value");

            dt.Rows.Add("1", "one");

            dataGridView1.DataSource = dt;
        }
    }
-- 
View this message in context: http://www.nabble.com/DataGridView-binding-not-working-tp20780541p20780541.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list