Results 1 to 5 of 5

Thread: EditorGrid validation

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    129
    Vote Rating
    0
      0  

    Default EditorGrid validation

    Hello:

    Ive tried some things but nothing seems to work.
    My case is, I have an editorGrid with several columns (only one of them is really editable). I want that, if possible, dinamically, when they fill the value in the editable cell, and tabulate to the next one, if the value entered isnt correct (there's a bottom limit and top limit values, which are showed in the grid too) that cell is marked as invalid with my own error message. Another possibilty I d like its to check this all when clicking a 'submit' button.
    And Id like to know if it's possible to change the background color of that cell to red just when the cell is invalid.
    Ive been searching for options but it seems i got blocked here...

    thanks

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Posts
    129
    Vote Rating
    0
      0  

    Default

    Ive found that I can manage if the value is right by adding a listener to the ValidatEdit Event...
    But how can I change the background color (or another style attribute of that specific cell? )

    Thanks

  3. #3
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    You can for example listen to the ValidateEdit event of the editorgrid, validate the value in that event and if it is not valid, restart editing and show a tooltip.

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Posts
    129
    Vote Rating
    0
      0  

    Default

    My goal is show a message like when a field is not valid (with the exclamation imagen and so) . I can get the cell by grid.getView().getCell(row,col).Ive used setInnerHTML to change color of the font , even add the 'title' attribute, so when you put the pointer on the content of the field a text is showed, but what I want is just show the validation messages of form fields of GXT.

    Any idea or help? Thanks

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    1
    Vote Rating
    0
      0  

    Default How was this eventually resolved?

    Other threads redirect here, yet this remains unanswered. How is this accomplished?

    I cannot get a rejected edit to return the cell to the pre-edit state tried the following in a listener for the ValidateEdit event

    record. :
    cancelEdit
    cancelBubble
    reject(true/false)

    (beginEdit();set(p,oldValue);setValid(p,true);endEdit(); )

    is the event thrown to late to cancel the edit?

    how can I intervene?

Similar Threads

  1. EditorGrid validation plugin
    By jsakalos in forum Ext 2.x: User Extensions and Plugins
    Replies: 36
    Last Post: 28 Apr 2016, 1:01 AM
  2. validation of Ext.form.Datefield in the editorGrid
    By c_ankit in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Mar 2009, 1:55 AM
  3. [FIXED] Validation tootips on cells in EditorGrid
    By hbrands in forum Ext GWT: Bugs (1.x)
    Replies: 1
    Last Post: 28 Oct 2008, 12:05 PM
  4. EditorGrid: Whole record client-side validation?
    By jsakalos in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 8 Jun 2007, 6:00 PM

Posting Permissions

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