Grid re-sorts itself after item in grid is selected

Certified Senior Developer

I have a simple interface rule that displays a grid of items sorted by an expiration date. The grid uses a query rule and a CDT for the items listed. My issue is that once the user selects one of the items, that item drops to the bottom of the list. Any idea why it would do this? I don't have any errors; the query rule does not include a 'sort by' and the selection part works just fine. I would also like the user to be able to sort on the other columns (which doesn't work now) but the most troubling issue is that the selected item moves to the bottom of the grid.

GridResortIssue.txt

OriginalPostID-225683

OriginalPostID-225683

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    As far as I remember, the issue with items shifting around on a paging grid when using the grid controls has something to do either with the data set not containing a unique ID (ie PKID), and/or no default SortInfo. To help yourself gain more insight into what's happening "in the gears", I always suggest adding a "DEBUG" paragraph field right above the paging grid, and point the "value:" at your dataSubset, so you can observe how it changes when items are selected.

    As far as sorting on your columns, I don't see any obvious issues in your current setup (but only after a quick look), though I need to point out that it's really intended to be run where the dataSubset is itself a live query which passes through the pagingInfo variable, instead of what you've done where the whole data set is loaded in one variable and then "datasubsetized" into a different one. That being said, if it's required to be that way you should be able to get it to work. The trick I mentioned above might help with this too.

    And an unsolicited suggestion: I notice you're validating against the user selecting more than one entry. I've developed the following trick to automate (as much as possible) the selection of just one row in the first place, so that you shouldn't need any validation in the future. This works in pretty much every SAIL paging grid I've tried it in: screencast.com/.../vSAewTmo77
Reply
  • 0
    Certified Lead Developer
    As far as I remember, the issue with items shifting around on a paging grid when using the grid controls has something to do either with the data set not containing a unique ID (ie PKID), and/or no default SortInfo. To help yourself gain more insight into what's happening "in the gears", I always suggest adding a "DEBUG" paragraph field right above the paging grid, and point the "value:" at your dataSubset, so you can observe how it changes when items are selected.

    As far as sorting on your columns, I don't see any obvious issues in your current setup (but only after a quick look), though I need to point out that it's really intended to be run where the dataSubset is itself a live query which passes through the pagingInfo variable, instead of what you've done where the whole data set is loaded in one variable and then "datasubsetized" into a different one. That being said, if it's required to be that way you should be able to get it to work. The trick I mentioned above might help with this too.

    And an unsolicited suggestion: I notice you're validating against the user selecting more than one entry. I've developed the following trick to automate (as much as possible) the selection of just one row in the first place, so that you shouldn't need any validation in the future. This works in pretty much every SAIL paging grid I've tried it in: screencast.com/.../vSAewTmo77
Children
No Data