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.
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.
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/
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.