1. #11
    Ext User spectrus's Avatar
    Join Date
    Feb 2008
    Posts
    43
    Vote Rating
    0
    spectrus is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    Of course, if invalid cells were visually marked it would add a lot of value...
    Definitely. That's what I'm pounding my head on for a while now.

    One more question: in your opinion, where would it be best to call the isValid() from if one wanted to validate the data which was just loaded into the grid? I think I just call it from the wrong place (right after grid.store.load() in grid's 'load' listener), and that's why it's not working properly.

  2. #12
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,523
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    GridView refresh event?
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  3. #13
    Ext User
    Join Date
    Dec 2007
    Posts
    28
    Vote Rating
    0
    manojo is on a distinguished road

      0  

    Default


    Hi,

    thanks for this piece of code. I've added a bit of code that would help me. I have a grid with a checkboxSelectionModel, and the grid will be valid if there is at least one selected value : so here it is :
    PHP Code:
    isValid:function(){
      return (
    grid.sm.getSelections().length 0);

    I put the grid in a formpanel, but I don't see this method being called. Am I missing something?

    Thanks,
    Manojo

  4. #14
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,523
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    It's fine if it suits you. Best is if you just override the function from outside and you do not change existing code. Upgrades are easier then...
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #15
    Ext User
    Join Date
    Dec 2007
    Posts
    28
    Vote Rating
    0
    manojo is on a distinguished road

      0  

    Default


    Hi jsakalos,

    I'm sorry but I didn't completely understand what you said. Do you suggest that I override isValid function for forms ?

    Thanks,
    Manojo

  6. #16
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,523
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Sorry, it I've overlooked that you're asking... I thought you've posted your change...

    isValid is function that is called from outside when you want to check if the grid contains valid data. It is not automatically called.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  7. #17
    Ext User
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
    raviext is on a distinguished road

      0  

    Default


    Hi Jack

    I am not sure if there is anyway i can post a query apart from replying to a post. Wanted some tips from you as i have been following from and past fews days and found you have been a great helping hand. Appreciate your diection.

    I am basically a Java developers and trying Ext JS. Need some suggestion on how should i start. Following are things where i face the difficulties.

    Sorry if the following question is a quite silly

    a) My object oriented javascript is little patchy, though from past couple of days learning it actively. So i find difficulties in little bit of understanding the syntax.

    Following is an excerpt from one of the forum.

    Ext.extend(Ext.ux.grid.RecordForm, Ext.util.Observable, {

    ,initComponent:
    function() {
    this.recordForm = new Ext.ux.grid.RecordForm({
    title:
    'Ext.ux.grid.RowRecord Example'

    ,iconCls:
    'icon-edit-record'

    ,columnCount:2
    ,ignoreFields:{compID:
    true}
    ,formConfig:{
    labelWidth:80
    ,buttonAlign:
    'right'

    ,bodyStyle:
    'padding-top:10px'

    }
    });

    });

    I couldn't under stand the way of defining the config parameters "initComponent:" , i was more confused with notation of ":" after the variable. I was expecting "=" instead of ":".

    Here what is "initComponent" ? . Is it a function , object or variable.

    Thanks
    -Rave

  8. #18
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,523
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I guess this is addressed to me (Saki) and not to Jack (Jack Slocum?).

    Anyway, it seems that you're dealing with understanding of basic Javascript syntax (: is used to define object properties, e.g. var o = {p1:1, p2:2}.

    The best advice I can give you at this stage is to buy (download, get a hold of) a good book on JavaScript language syntax, watch Dough Crockford videos (google for them, should be found somewhere at Yahoo) and try to locally install some examples from extjs.com site. Not extensions or plugins yet as they may create more confusions.

    There are also good tutorials for beginners on how to install Ext and how to start to play with Ext easy way. http://extjs.com/learn

    Good luck!
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  9. #19
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    I couldn't under stand the way of defining the config parameters "initComponent:" , i was more confused with notation of ":" after the variable. I was expecting "=" instead of ":".

    Here what is "initComponent" ? . Is it a function , object or variable.
    initComponent is a property / member of an object. When you're inside an object literal the "{" and "}" the syntax for specifying properties / members is to use a ":" instead of "=". Also note you separate with "," (comma), and you do not close with ";" (semi-colon).

  10. #20
    Ext User
    Join Date
    Dec 2007
    Posts
    28
    Vote Rating
    0
    manojo is on a distinguished road

      0  

    Default


    Hi Saki,

    thanks for that. Is there a mean anyhow to call this function when isValid for a form is called ? I had a look at the code for SimpleForm, and basically what is does is, call the validate() method for each of its elements.
    Then I went and had a look at TextField, but there is no validate() method, rather a validateValue()

    I'm a bit confused here. Is the validate method really called?
    Moreover, for my grid, is it possible to have that nice exclamation mark if it is invalid ?

    How do I do that?

    thanks,
    Manojo

    PS : If I'm deviating from the main topic of the post, I can transfer the discussion somewhere