Spread connected to DataSource cannot be edited.

Posted by: robshepherd on 8 September 2017, 2:28 pm EST

  • Posted 8 September 2017, 2:28 pm EST

    <p>Hi,</p><p> I am currently binding my grid to a DataTable (dt).  The DataTable has been filled from a database.</p><p> p_fpSpread.DataSource = dt;</p><p> fpSpread is then filled with the appropriate data.
    </p><p> I have set EditModePermanent = true and EditModeReplace = true.</p><p>There are no locked cells.  I am using cell select mode.</p><p> I cant type into any cell.  I have tried this with the standard DataGridView and it works without any problem.</p><p> If I fill fpSpread by stepping through dt and assign each cell then editing works but not when I use a DataSource.
    </p><p>Can someone help please?
    </p><p> Rob.</p>
  • Replied 8 September 2017, 2:28 pm EST


    Can you please send me a sample replicating the issue as I am unable to replicate the issue at my end setting the DataSource property. There must be some other property which must be stopping you from typing into the cell. Here is the code I used:-

                string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\stduser\\Desktop\\Northwind.mdb";

                OleDbConnection con = new OleDbConnection(connectionString);

                string qstringCustomers = "SELECT * FROM Customers";

                DataTable dt = new DataTable();

                OleDbDataAdapter adapterCustomers = new OleDbDataAdapter(qstringCustomers, con);


                fpSpread1.DataSource = dt;

                fpSpread1.EditModePermanent = true;

                fpSpread1.EditModeReplace = true;

                fpSpread1.SelectionBlockOptions = SelectionBlockOptions.Cells;

    Please send us a sample in order to proceed further. Thanks.
  • Replied 8 September 2017, 2:28 pm EST

    Problem solved.

    It was an issue associated with Update and ODP.NET. 

    Thanks anyway.


Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels