powercat-creator-kit icon indicating copy to clipboard operation
powercat-creator-kit copied to clipboard

RaiseOnRowSelectionChangeEvent Self.EventRowKey is index number even though I set the RecordKey property

Open kayetter opened this issue 2 years ago • 3 comments

Describe the bug RaiseOnRowSelectionEvent results in a Self.EventRowKey that is an index number instead of the RecordKey id I set in the RecordKey property.

To Reproduce Steps to reproduce the behavior:

  1. Set RaiseOnRowSelectionChangeEvent property to true
  2. Set RecordKey property to the column of your items that you want to use as the id. Note: make sure this column is included in the fields of the items set on the controls property pane
  3. Set OnChange property fx: Notify($"{Self.EventName}, {Self.EventRowKey}");
  4. Select a record in your details pane and note that the Self.EventRowKey displays an index
  5. But I can get the record from the Self.Selected property so maybe this is ok although if I have multi-select, I wanted to get to the that last selection.

Expected behavior I was expecting that the Self.EventRowKey would display the value of the field that I set in the RecordKey property for this selected item.

Screenshots image

Additional context Just to be sure I was troubleshooting this appropriately, I changed one of my Column_Items to be a link so that I could trigger a CellAction instead of row selection and see if the EventRowKey would return my RecordKey which it did so it is not my column configurations.

image

AB#999

kayetter avatar Jan 09 '23 01:01 kayetter

I think this in my usage of the feature for the CoE as well.

Jenefer-Monroe avatar Jan 16 '23 14:01 Jenefer-Monroe

Hi @kayetter Thanks for reporting - I can reproduce it. It only seems to happen for collections. If the grid is bound directly a dataverse table, then the EventRowKey correctly gives the id of the row.

scottdurow avatar Jan 17 '23 00:01 scottdurow

When is this going to be fixed? This was reported in January and the problem is still occurring in September. What can you even do with the row id returned? This is a critical issue with the DetailList. There is no other way to determine the item a user selected as the Selected property is not yet set in certain instances. Please help getting this resolved! Or provide a work-around?

Regards,

-S

sperry1625 avatar Sep 11 '23 13:09 sperry1625