I am using an ExtJS 3.0 grid and generate data from PHP using MySQL. I have setup my idProperty of the grid on the id column. The problem is that I have 2 tables for incoming invoices and one for outgoing invoices with same columns. I want to make a UNION ALL on these 2 tables and show the result into the ExtJS grid. The problem is that there are some duplicate id’s coming out from these tables that causes the ExtJS grid to skip them rows. I know I can do simple UNION to skip duplicates but I need every row in the grid, even if they have the same id. There are actually no distinct data that I can relate to.
Any ideas ? Thanks.
Why not add some prefix to the id-column when
SELECTing the data:You’ll have to make sure that the field-definition for the
id-field in your reader configuration has the correct type (autoorstringin this case).If you need the real
idafterwards, change the query to select the realidas well:Your
idPropertywill begidnow.