royale-asjs icon indicating copy to clipboard operation
royale-asjs copied to clipboard

j:DataGridSort is missing

Open YRenault opened this issue 3 years ago • 2 comments

Hi,

The class "DataGridSort" is not present in the package "org.apache.royale.jewel.beads.controls.datagrid" for Apache Royale version 0.9.7. But it is used and functional on Tour de Jewel Examples : https://royale.apache.org/tourdejewel/#!datagrid_panel

Is it a mistake ? Where can I find the source code please ?

By the way, would it be possible to implement multiple sort on datagrid ?

Thanks a lot.

YRenault avatar May 19 '21 16:05 YRenault

In order to use that functionality you need to use nightly build of Apache Royale.

piotrzarzycki21 avatar May 19 '21 17:05 piotrzarzycki21

Hi,

I use Royale 0.9.9

I've an issue about Datagrid sort that I could reproduce on the example : https://royale.apache.org/tourdejewel/#!datagrid_panel

If we click on the "Load Data" button, the sort does'nt work anymore.

Thank you for your help

Nisaba avatar Mar 05 '22 09:03 Nisaba

Hi, just for reminder... Any news about this sorting issue ?

Nisaba avatar Apr 26 '24 19:04 Nisaba

Hi Nisaba, The problem was that "Load Data" assigned an ArrayList to the dataProvider and requires an ArrayListView (to allow sorting) I have modified the repository but I don't know when the TDJ build will be available.

For now I show you the result:

GIF 27-04-2024 19-17-50

And the modification I have made:

private function loadDataProvider(datagrid:DataGrid):void
{
	var arl:ArrayList = new ArrayList([
		new Product("rz302","New",80,105,"assets/smallyellowrect.jpg"),
		new Product("dh442","Records",10,340,"assets/smallredrect.jpg"),
		new Product("ps222","to show!",35,190,"assets/smallorangerect.jpg"),
		new Product("ps102",":-)",44,200,"assets/smallbluerect.jpg"),
	]);
	if(datagrid == dg2)
		datagrid.dataProvider = new ArrayListView(arl);
	else
		datagrid.dataProvider = arl;
}

mjesteve avatar Apr 27 '24 17:04 mjesteve

Great, it works, Thanks !

Nisaba avatar Apr 27 '24 22:04 Nisaba