on 10-05-2014 4:00 PM
Hi Experts,
I have a few i5Grids with the selection envent enabled.
the grid has the selection event enabled. Whcih works fine on the grid as is.
But if the user filters or sorts the rows and selects the values, the select cell value returns the values of the rows that were originally in that position.
Eg:
In the original grid I have 40 rows with where the row I am looking for is in the 20th position and a random row at third position.
I filter/sort the row so that the 20th row now moves to the third position.
Now when I select the 20th row which is now on the third position, The values returned by the selection event are of the original third row before sorting.
But I expect to get values of the 20th row which has now moved to third position.
Please help. I am using MII 14.0 SP05
Regards
Maaz
Hi Maaz,
Also, this looks like something to do with the sequencing of the code. Can you share the code piece.
Thanks,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swaroop,
The code piece is quiet big but to summerise I have a
grdLoadDtls.registerRowSelectionEventHandler(fnLoadSltd);
and the function has operations like
DrpDnPONum.setSelectedKey(grdLoadDtls.getGbject().getSelectedCellValue(11)); | |
RfrshMatGrd=0; | |
venDef = $.Deferred(); | |
DrpDnPONum.fireChange(''); | |
venDef.done(function(value) { | |
DrpDnVendor.setSelectedKey(grdLoadDtls.getGridObject().getSelectedCellValue(12)); | |
DrpDnVendor.fireChange(''); |
and a lot more.
All the operations are performed perfectly when the rows are unsorted/not-filtered.
Once re-ordered, it still performs all the operations correctly as there are no errors.
But the selected row is according to the original row positions in the grid, not the new ones after the sort/filter.
So the vales populated in the fields below the grid are not from the row that is selected on the grid. But the row that was originally in that position before sort/filter.
Regards
Hi Maaz,
I second Ria here. I was trying to get something by which we can impose 2 way binding on i5grid's model but could not get anything as such.
Please raise a ticket and do let us know about further proceedings.
Warm Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ria,
Thanks, I am trying to get a ticket raised. Facing delays due to the holiday season in Middle East
Hi Swaroop,
I am using the filter and sort functionality available on clicking the column header.
Yes post sort I need the right values on selection.
var addProps = '{'+
'"DisplayTemplate":"<Path to template>",'+
'"QueryTemplate":"<Path to query>",'+
'"DisplayColumns":"<Cols>",'+
'"ColumnWidths":"<Widths>",'+
'"ColumnHeadings":"<Headings>",'+
'"ColumnAlignments":"<Alignments>",'+
'"Content-Type":"image/png"'+
'}';
var grdLoadDtls = new com.sap.xmii.grid.init.i5Grid(
'<Path to template>',
'<Path to query>',
addProps
);
grdLoadDtls.setGridWidth("100%");
grdLoadDtls.setGridHeight("100%");
grdLoadDtls.registerRowSelectionEventHandler(fnLoadSltd);
grdLoadDtls.getQueryObject().setParameter("Param.1", param1); | |
grdLoadDtls.getQueryObject().setParameter("Param.2", param2); | |
grdLoadDtls.getQueryObject().setParameter("Param.3", param3); | |
grdLoadDtls.getQueryObject().setParameter("Param.4", param4); | |
grdLoadDtls.getQueryObject().setParameter("Param.5", param5); | |
grdLoadDtls.update(update); |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maaz,
I wanted to see the portion where you are loading the data. i Guess you are using default function for sorting!!
You would want to see values updated when a cell is selected post sort right.
Warm Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maaz,
From your above description it does look like an issue/bug. You should open a ticket with SAP to get this fixed.
Thanks and Best Regards,
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.