Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: HowTo:remove the red mark in the EditorGrid field on edit?

  1. #1
    Ext User
    Join Date
    May 2007
    Posts
    52
    Vote Rating
    0
      0  

    Default HowTo:remove the red mark in the EditorGrid field on edit?

    Hi All,

    While edit happening in the Ext.grid.EditorGrid's cell .. one red mark is appearing at top left corner of the cell.I dont want to show the red mark on Edit.. How can i achieve this.

    i am placing the screen shot of the same...

    Please any ideas ..

    Thanks in advance...
    Srinivas
    Attached Images Attached Images

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    86
      0  

    Default

    Try looking @ the grid css. It's in there somewhere. you can inspect with firebug to get your answer.

  3. #3
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
      0  

    Default

    This seems like an easy way.

    Code:
    grid.on('afteredit', afterEdit, this );
    function afterEdit(val) {
        val.record.commit();
    };

  4. #4
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    86
      0  

    Default

    ^^ Does that execute an XHR to send/commit data to the server?

  5. #5
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
      0  

    Default

    nope, just changes the cell style back to the one without the little red corner and updates the data store with the new value.

  6. #6
    Ext User
    Join Date
    May 2007
    Posts
    52
    Vote Rating
    0
      0  

    Default Solved.

    Thanks VinylFox .. It works perfectly fine.

    Thanks once again,
    Srinvias.

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    This CSS will do it:

    Code:
    .x-grid-dirty-cell {
         background-image:none;
    }
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

  8. #8
    Ext User
    Join Date
    May 2007
    Posts
    52
    Vote Rating
    0
      0  

    Default More Light weight.

    Thanks Jack,

    This solution looks more light weight than making the javascript call and it also working perfectly fine.

    Thanks once again,

    srinivas

  9. #9
    Ext User
    Join Date
    Feb 2008
    Posts
    24
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by jack.slocum View Post
    This CSS will do it:

    Code:
    .x-grid-dirty-cell {
         background-image:none;
    }
    but what if i want to remove the red triangle only from some records (and not all)?

  10. #10
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
      0  

    Default

    Quote Originally Posted by zoola View Post
    but what if i want to remove the red triangle only from some records (and not all)?
    hook into the grid's validateedit event and cancel it if the edit occurred on a targeted row, then set the field's new value in the Record directly
    Code:
    grid.on('validateedit', function(e) {
      var myTargetRow = 6;  
    
      if (e.row == myTargetRow) {
        e.cancel = true;
        e.record.data[e.field] = e.value;
      }
    })

Page 1 of 2 12 LastLast

Posting Permissions

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