Hi,

I see a DataGridPercentageLayout bead, which you did not mention, so you 
probably need that to go with DataGridPercentageView.  If that doesn’t work, 
let us know, however, I’ve got a lot of other issues in my queue before I can 
take a serious look at this.

However, one thing to keep in mind about Basic and Express is that they 
emphasize the Pay-as-you-go (PAYG) philosophy, which is quite different from 
Flex which was more of a one-size-fits-all philosophy.  Your situation is a 
good example of the difference PAYG creates between Flex and Royale.

In Flex (and in fact, in the MXRoyale DataGrid) the DataGridColumn has a width 
property that could take percentage or an actual number.  This requires code to 
check if the DataGridColumn is using percentage or actual number.  This extra 
checking occurred in many places in Flex in order to have one DataGrid that 
could do anything and other optional features of other components 
(one-size-fits-all).   This made it easier to get started in Flex because you 
could just add a DataGrid and configure it to your needs, but all of that extra 
checking needed to be downloaded and run, and it was very rare for someone to 
want to switch a DataGridColumn from percentage to actual number at runtime.

So, in Royale Basic, you choose the beads at compile time that dictate if the 
DataGrid is going to use percentages for columns or not.  There is a default 
(actual numbers) but you can get percentages if you need it.  But not only do 
you need to use a DataGridPercentageView, but you also need to use the 
DataGridPercentageLayout.  So this is more configuration up front, but in the 
end, if you only have one DataGrid and it is using percentages, then you will 
be downloading and running the least amount of code by not carrying around the 
checks for whether you are using percentages or actual numbers and the code 
that does layout with actual numbers.

Meanwhile, the Express package pre-packages more beads.  Someone could create a 
set of beads and an Express DataGridColumn that supports your suggestion of 
having a width property that supports either percentage or actual numbers and 
add the right Basic beads for that DataGrid.  Or maybe we need a 
DataGridPercentageWidthColumn.  Or create a set of heavier beads that combines 
the current actual and percentage beads for DataGrid.  But the Basic 
DataGridColumn would not have a width property that can handle either 
percentage or actual numbers.  That kind of thing would go in Express, Jewel, 
and or other not-so-basic libraries.

HTH,
-Alex



From: "[email protected]" <[email protected]>
Organization: Cristallium
Reply-To: "[email protected]" <[email protected]>, 
"[email protected]" <[email protected]>
Date: Monday, October 21, 2019 at 3:45 AM
To: "[email protected]" <[email protected]>
Subject: [Discuss] DataGrid DataGridColumn basic component


Hi Guys,

I try to get a DataGrid working.

Tried basic and express one, the basic is the one wich seem working except that 
we can only use fixed column width. (because DataGridColumn's columnWidth 
accept only strict number and there is no width property available)

There is an issue with bead named DataGridPercentageView  because % width is 
overwritten on layoutNeeded event by DataGridLayout

If we look at DataGridColumn class It seems to me that the property columnWidth 
(accept only strict number like 50, not '50%' ) should be renamed by width  
that would accept number with % or without and that DataGridLayout should 
handle this. Moreover DataGridPercentageView bead would be useless and we could 
delete this bead.

Could I have your opinions ? thanks

Regards




--

Frédéric Gilli

mob.0668542622

http://www.cristallium.com<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cristallium.com&data=02%7C01%7Caharui%40adobe.com%7Cdd767a1f18c945c0e45a08d75613b89c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637072515016988402&sdata=WucnNlD07kgtipABJpZGDeWyRLAQvmwV9VzZf3bcxqI%3D&reserved=0>

[cid:[email protected]]<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cristallium.com&data=02%7C01%7Caharui%40adobe.com%7Cdd767a1f18c945c0e45a08d75613b89c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637072515016988402&sdata=WucnNlD07kgtipABJpZGDeWyRLAQvmwV9VzZf3bcxqI%3D&reserved=0>


Reply via email to