Results 1 to 5 of 5

Thread: How to prevent record changing in grid

  1. #1
    Sencha User evgenspb's Avatar
    Join Date
    Jun 2010
    Location
    Russia Saint-Petersburg
    Posts
    38

    Question How to prevent record changing in grid

    Hello guys

    I have form and grid.
    They are linked.
    User can change record in the form by the grid.
    It is possible to modify record in the form.
    I want fire confirmation (Do you really want to lost data?) if user modify current record, but tries to change record by grid without saving (or canceling).
    If user select NO (do not want lost data) I need to prevent record changing.

    Any Ideas?

    Evgeny

  2. #2

    Default

    So you have a listener for the grid's selection model's row select event and you populate the form when the selection changes with the current row's data?

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Write a beforerowselect event handler (since Ext.MsgBox.confirm is asynchronous you need to write some additional code).

  4. #4
    Sencha User evgenspb's Avatar
    Join Date
    Jun 2010
    Location
    Russia Saint-Petersburg
    Posts
    38

    Default

    Guys, sorry for long delay.
    I worked in offline zone last days.
    Condor, I have found the same way as you offered.
    Thanks you a lot, I am sure that I am on right way now.

    BTW
    I guess asynchronous confirm (or alert) is a some problem for guys who worked with C++, VB or another nonWEB system early.

    Best regards
    Evgeny

    P.S.
    Sorry for my English, I did not have any practices several years .

  5. #5
    Sencha User evgenspb's Avatar
    Join Date
    Jun 2010
    Location
    Russia Saint-Petersburg
    Posts
    38

    Default

    Thank you a lot

Similar Threads

  1. [2.2] Using record converter functions when changing data
    By jweber in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 13 Aug 2009, 8:13 AM
  2. Changing a Record: record.set('X','txt') vs record.[i].data.X = 'txt'
    By alibaba69 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 14 Dec 2008, 4:19 AM
  3. rowIndex changing when removing record on beforerowselect
    By ChrisR in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 8 Nov 2007, 3:04 AM
  4. Changing the id of a Record
    By jbowman in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 18 Apr 2007, 5:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •