Problems with binding and undo/redo buttons

  • I am binding to the text property and using the OnUpdateGUI event to call NotifyPropertyChanged on the text property. When I do this, the undo and redo buttons cease to work and my cursor position moves to the first position in the control.

    What is the proper way to bind to this control so that no functionality is lost?

    • Offizieller Beitrag

    Hi,

    I would recommend to use events to load the text from the databas blob directly using Memo.LoadFromVar inside the dataset events.

    The undo problem is caused by the database reloading the text when the first char is typed or the first change is made. I cannot do anything about that, loading will and has to always clear the undo stack.

    If you use the events You can decide if and when to load the data. This is important if there are images in the text since the blob can become big.

    Julian

  • Hi!

    We have problems binding datatables that has foreign key relations to other tables. We are developing in using Farpoint 4.0.2001.2005, Visual Studio 2008 and Sql Server 2005.

    We want to display a table with that has foreign key relations but we don't want to display the id that the relation is based on (the id doesn not help the user but other column data will), but another column from the related table. We have tried a couple of different approaches.

    1. We tried the event RowsAdded in the DataGrid to sort out which columns to display for each row added to the grid. We are not able to find a similar event for the Spread. What event can we use to access the DataBoundItem for each row added in the Spread when binding to a datasource?

    2. We have also tried using a combobox for the columns with foreign keys to display and bind to the related table by using the DataGrid and setting the data properties DataSource, DisplayMember and ValueMember to desired columns in the related table. Are there a similar way to do this in the Spread?

    Another problem is when using hierachical spread. How do you know which level your in when making changes to a sublevel table? How can you create a new post in a sublevel and still get the bindings to work?

    We'd prefer to user Spread cos we need to implement undo and redo and this works fine in Spread but we have come across these issues instead.

    I hope my descriptions of our problems are understandable, please tell me if anything is unclear.

    Thanks!