In Spreadsheet when i type in cell that time not call endedit when we leave from cell that time call endedit in C#.window Application.

Posted by: sanjay18 on 8 September 2017, 2:24 pm EST

  • Posted 8 September 2017, 2:24 pm EST

    Hi,


          In Spreadsheet windows form when I type in Cell that time not call endedit when we leave from cell that time call endedit i want to call on without leaveing the cell.


    In spreadsheet in  type on cell when save that record that record not save because i not leaveing that cell after type on that cell i want  when type on cell n i not leaving that cell that time also save record means called endedit on that cell ..


    without leaving on that cell call propertychanged event on that cell.


     


    please reply me............


    Regards,


    Sanjay Chaudhari,


    Mumbai,


    India.


     


     


     


     

  • Replied 8 September 2017, 2:24 pm EST

    Below is a link to a forum thread dealing with a very similar issue. It appears the solution is to write a method to update your database and call it from an event handler in Spread, or maybe from a button you could put on your form.


    http://www.clubfarpoint.com/Forums/forums/thread/50384.aspx

  • Replied 8 September 2017, 2:24 pm EST

    Hello Sanjay,

    The link provided by Paul in the last post will work for Spread for Web forms. You may write the code as follows on a button click to save the data to database without leaving the cell.

     private void button1_Click(object sender, EventArgs e) //Update database
            {
                foreach (DataRow row in (fpSpread1_Sheet1.DataSource as DataTable).Rows)
                row.EndEdit();
                adapterEmployees.Update(ds, "Employees");
                ds.AcceptChanges();
            }

     I hope it will help you.

    Thanks,

Need extra support?

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

Learn More

Forum Channels