Peter, You changes working in my example.
One thought is that It is a bit odd to me that we need to add also style DataGrid once we add DynamicDataGrid. I can live with that. Thank you 2018-01-18 22:45 GMT+01:00 Piotr Zarzycki <[email protected]>: > Wonderful! > > I will refresh also my private examples to check how things work. > > Thank you so much! > Piotr > > > 2018-01-18 22:35 GMT+01:00 Peter Ent <[email protected]>: > >> Hi, >> >> I just pushed changes to the DataGrid and TreeGrid that should make things >> work. I included upgrades to the DataGridExample and TreeExample. >> >> Doing: <js:DataGrid className="DynamicDataGrid myAdditionalClass >> DataGrid"> should work fine. You should include the "DataGrid" style so >> that it picks up any missing default values. >> >> The "DynamicDataGrid" style is part of defaults.css and combines beads >> together to make it easier to use. You can, of course, add the beads >> separately. >> >> The examples also show how to style the cells. >> >> I haven't been able to get the SWF and HTML versions to show styles the >> same way. Mostly, they are missing on the SWF side, so I'll add that to my >> list of things to look into. But you should have greater control on the >> HTML side. >> >> —peter >> >> On 1/17/18, 4:17 PM, "Piotr Zarzycki" <[email protected]> wrote: >> >> >Well if the Above example of usage is not working, we need to figure out >> >how to have it working. I can of course copy everything what is inside >> >DynamicDataGrid style and add my things, but this is not the solution. >> > >> >Thanks! >> > >> >2018-01-17 22:10 GMT+01:00 Peter Ent <[email protected]>: >> > >> >> I'm not sure; it is a good question. I will have to experiment. >> >> >> >> The DataGridModel works with ArrayList now. What I would do is change >> it >> >> to work with Array and then make a new model for the ArrayList or >> >> ICollectionView, which to me, is a better choice over ArrayList since >> >>its >> >> an interface and more adaptable. >> >> >> >> >> >> ‹peter >> >> >> >> On 1/17/18, 4:07 PM, "Piotr Zarzycki" <[email protected]> >> wrote: >> >> >> >> >Hi Peter, >> >> > >> >> >To me it is a good change. I was always wondering why DG is working >> >>with >> >> >ArrayList default. However let's say that I wanted to switch some of >> >>the >> >> >beads for that DataGrid or add some custom class. How am I supposed to >> >>add >> >> >second css class ? >> >> > >> >> >If I have this: <js:DataGrid className="DynamicDataGrid"> and I have >> >> >something in my css file .myAdditionalClass { }. Will it work ? >> >> > >> >> ><js:DataGrid className="DynamicDataGrid myAdditionalClass"> >> >> > >> >> >Thanks, Piotr >> >> > >> >> >2018-01-17 20:58 GMT+01:00 Alex Harui <[email protected]>: >> >> > >> >> >> IMO, the DataGrid in Basic should work with Arrays and a different >> >>set >> >> >>of >> >> >> beads allow it to work with ArrayList and another set of beads >> >>provides >> >> >> detection of changes to the ArrayList. As long as we have those >> >>beads >> >> >> (and maybe some tests/examples to prove it all works), the default >> >>set >> >> >>of >> >> >> beads is less important. That decision should be driven by users and >> >> >>maybe >> >> >> by us if there is some other goal we want to hit (like making an >> >>example >> >> >> be smaller than some number of bytes. >> >> >> >> >> >> If you are going to create a style definition of DynamicDataGrid >> >>should >> >> >> also create a DynamicDataGrid class that packs in the required set >> of >> >> >> beads. >> >> >> >> >> >> The DataGrid in Express will likely evolve to pack a set of beads >> >>that >> >> >> don't care if the data provider is an Array or ArrayList. For now >> it >> >> >>can >> >> >> just assume ArrayList. >> >> >> >> >> >> My 2 cents, >> >> >> -Alex >> >> >> >> >> >> On 1/17/18, 11:43 AM, "Peter Ent" <[email protected]> wrote: >> >> >> >> >> >> >Hi, >> >> >> > >> >> >> >I'm proposing a change to DataGrid default configuration. Right now >> >> >> >DataGrid is designed to work with ArrayList; its does not work with >> >> >> >Array. I propose that the default configuration for DataGrid is to >> >>use >> >> >> >Array as its dataProvider and provide no dynamic abilities. >> >> >> > >> >> >> >We would include in the defaults.css a style definition, >> >> >> >DynamicDataGrid, which would set up DataGrid to use the more >> dynamic >> >> >> >ICollectionView set of beads. When items were added or removed from >> >>the >> >> >> >dataProvider, the grid would automatically reflect the change. >> >> >> > >> >> >> >Doing this would provide a better PAYG experience. Or do you think >> >> >> >DataGrid is too advanced to bother with Array at all? >> >> >> > >> >> >> ><js:DataGrid> would require its dataProvider be an Array. >> >> >> ><js:DataGrid className="DynamicDataGrid"> would require its >> >> >>dataProvider >> >> >> >be ArrayList (or any thing that implements ICollectionView). >> >> >> > >> >> >> >What do you think? Should DataGrid's default configuration work >> with >> >> >> >Array and then use PAYG to upgrade it to more dynamic components if >> >> >> >that's what the developer wants? >> >> >> > >> >> >> >One more thing: the List's default configuration uses Array and you >> >> >>have >> >> >> >to add dynamic beads if you want it to respond to changes. I would >> >>also >> >> >> >add a "DynamicList" style to make it easier to do that. This way >> >>there >> >> >>is >> >> >> >consistency between List and DataGrid. >> >> >> > >> >> >> ><js:List> would require its dataProvider to be an Array. >> >> >> ><js:List className="DynamicList"> would require its dataProvider to >> >>be >> >> >> >ArrayList (or any thing that implements ICollectionView). >> >> >> > >> >> >> >Thanks, >> >> >> >Peter >> >> >> > >> >> >> > >> >> >> >> >> >> >> >> > >> >> > >> >> >-- >> >> > >> >> >Piotr Zarzycki >> >> > >> >> >Patreon: >> >> >*https://na01.safelinks.protection.outlook.com/?url= >> >> https%3A%2F%2Fwww.patr >> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com% >> >> 7C0e49839e7e584159 >> >> >267908d55dee5e4d%7Cfa7b1b5a7b34438794aed2c178de >> >> cee1%7C0%7C0%7C636518200725 >> >> >558336&sdata=VsmG4W6WXx5v2%2Blfa3s9ieXuVsjCv% >> >> 2BRWa84LNf6W11M%3D&reserved=0 >> >> ><https://na01.safelinks.protection.outlook.com/?url= >> >> https%3A%2F%2Fwww.patr >> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com% >> >> 7C0e49839e7e584159 >> >> >267908d55dee5e4d%7Cfa7b1b5a7b34438794aed2c178de >> >> cee1%7C0%7C0%7C636518200725 >> >> >558336&sdata=VsmG4W6WXx5v2%2Blfa3s9ieXuVsjCv% >> >> 2BRWa84LNf6W11M%3D&reserved=0 >> >> >>* >> >> >> >> >> > >> > >> >-- >> > >> >Piotr Zarzycki >> > >> >Patreon: >> >*https://na01.safelinks.protection.outlook.com/?url=https% >> 3A%2F%2Fwww.patr >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C1 >> 0d8bd7f1c8142fd >> >99c408d55defbba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0% >> 7C0%7C636518206583 >> >734743&sdata=jnmNjh97hWUKYWkBL26vtw9jLeUeF%2F2rXb9FNSBFWVs%3D&reserved=0 >> ><https://na01.safelinks.protection.outlook.com/?url=https% >> 3A%2F%2Fwww.patr >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C1 >> 0d8bd7f1c8142fd >> >99c408d55defbba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0% >> 7C0%7C636518206583 >> >734743&sdata=jnmNjh97hWUKYWkBL26vtw9jLeUeF%2F2rXb9FNSBFWVs% >> 3D&reserved=0>* >> >> > > > -- > > Piotr Zarzycki > > Patreon: *https://www.patreon.com/piotrzarzycki > <https://www.patreon.com/piotrzarzycki>* > -- Piotr Zarzycki Patreon: *https://www.patreon.com/piotrzarzycki <https://www.patreon.com/piotrzarzycki>*
