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

    Hi,

     I am currently binding my grid to a DataTable (dt).  The DataTable has been filled from a database.

     p_fpSpread.DataSource = dt;

     fpSpread is then filled with the appropriate data.

     I have set EditModePermanent = true and EditModeReplace = true.

    There are no locked cells.  I am using cell select mode.

     I cant type into any cell.  I have tried this with the standard DataGridView and it works without any problem.

     If I fill fpSpread by stepping through dt and assign each cell then editing works but not when I use a DataSource.

    Can someone help please?

     Rob.

  • Replied 8 September 2017, 2:28 pm EST

    Rob,

    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);

                adapterCustomers.Fill(dt);

                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.

     Rob.

Need extra support?

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

Learn More

Forum Channels