1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    20
    Vote Rating
    1
    oohogwash is on a distinguished road

      0  

    Default Simple Ext.grid.property.Grid read only row question

    Simple Ext.grid.property.Grid read only row question


    I have been searching the archives for how best to disable editing of specific rows in a property grid.
    I have found old references and rewrites to achieve this but nothing that works for the 4.X version.
    I am about to give up on the stock code and am asking on here in the hope that someone has an easy solution for this.
    I would also like to set up categories but believe this would be a set of property grids if I can get them to work.

    Thanks for any help you can give.

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    How do you determine which rows would be disabled for editing?

  3. #3
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Quickly thrown together, but is this (functionally) what you're after? http://jsfiddle.net/existdissolve/wMcQk/

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    20
    Vote Rating
    1
    oohogwash is on a distinguished road

      0  

    Default thanks

    thanks


    That is exactly what I was after, thank you so very much.

    I am sending in an array of fields that are to be read only, I had tried using a complex type for each field with extra attributes like read only, min, max etc but it just ignored the type as it is not supported.
    I might take a look at the source and see if I can add in extensions to the types supported.

    While I have your eyes on this, if I wanted to make a custom dialog for a complex type... is there anything special I need to do.
    I was thinking of showing something readable with a custom renderer then a custom editor that shows as dialog, The examples all show field editors that edit in place, except the date time, which I am hoping to find some inspiration from.

  5. #5
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Depending on the version of ExtJS you're using, you can use either the customEditors (pre-ExtJS 4.1.3) or the sourceConfig (ExtJS 4.1.3) to specify custom editors.

    RE: super-fancy custom editors, I've updated my example with a panel that has a nested form. It's a simple example, but shows that you could theoretically do whatever you wanted to do: http://jsfiddle.net/existdissolve/wMcQk/

    Hope this helps!

  6. #6
    Sencha User
    Join Date
    May 2012
    Posts
    20
    Vote Rating
    1
    oohogwash is on a distinguished road

      0  

    Default great stuff

    great stuff


    Thats an amazing example... simple to you but to me I would never have bought all those concepts together to create the result.
    I will mull over the sample and get my app going... thanks

    How did you get to that level of understanding, it seems almost too much to piece together using the online stuff without some guidance.

  7. #7
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Quote Originally Posted by oohogwash View Post
    Thats an amazing example... simple to you but to me I would never have bought all those concepts together to create the result.
    I will mull over the sample and get my app going... thanks

    How did you get to that level of understanding, it seems almost too much to piece together using the online stuff without some guidance.
    Honestly, it's mostly just a combination of trial and error, as well as spending a lot of time in the docs and the source.

    My main approach to this solution, though, followed something like this:
    • I need a new field type
    • Date field (like you suggested) has some elements that look similar to what I need (e.g., the little floating panel thingy)
    • Date field extends Ext.form.field.Picker, so I will too!
    • Extending Ext.form.field.Picker requires the custom implementation of createPicker (per the docs)
    • What should createPicker look like? I opened the source for Ext.form.field.Date, stole the code, and started from there
    After that, the rest was pretty easy. I was able to just tweak and add on to what is already in the framework, adjusting as needed by reading the docs for Ext.form.field.Picker and specifying the config as needed.

  8. #8
    Sencha User
    Join Date
    May 2012
    Posts
    20
    Vote Rating
    1
    oohogwash is on a distinguished road

      0  

    Default thanks

    thanks


    Thats the approach I have too, i seem to be going very slowly... but at least i am going forwards :-)

    Thanks again for all of your help, it is really appreciated...

  9. #9
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Absolutely, happy to help!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."