Skip to content

Conversation

tishko0
Copy link
Contributor

@tishko0 tishko0 commented Oct 22, 2024

fixes #622

Removed old generated sample from xplat and fixed name so the correct custom sample is displayed on the cell editing page of IgrGrid

@tishko0 tishko0 requested a review from dkamburov October 22, 2024 10:17
@MarielaTihova MarielaTihova added the status: verified PR is ready for merging label Nov 1, 2024
@dkamburov
Copy link
Contributor

@tishko0 can you please resolve the conflict

1 similar comment
@dkamburov
Copy link
Contributor

@tishko0 can you please resolve the conflict

@@ -1,35 +1,79 @@
igRegisterScript("WebGridEditingExcelStyle", (ev) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This handler isn't attached anywhere. It can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

if ((key >= 48 && key <= 57) || (key >= 65 && key <= 90) || (key >= 97 && key <= 122)) {
var columnName = grid.getColumnByVisibleIndex(activeElem.column).field;
var cell = grid.getCellByColumn(activeElem.row, columnName);
grid1.addEventListener('activeNodeChange', (event) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be bound via the grid's template using the ActiveNodeChangeScript property.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding it with the property does not register the event, and it is not working. Not adding it for now. Needs further investigation

Copy link
Contributor

@MayaKirova MayaKirova Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tishko0 Works just fine on my side if the handler is registered correctly:

igRegisterScript("onActiveNodeChange", (ev) => {
    const grid = ev.target;
    grid.endEdit();
    (grid.getElementsByClassName("igx-grid__tbody-content")[0]).focus();
}, false);

And the property is set to match the name:

ActiveNodeChangeScript="onActiveNodeChange"
image

I see no issue with the property.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea what is wrong with this, tried it now and it hits the breakpoint inside while it did not back then. Added it and resolved conflicts, should be all good now.

if (cell && !grid.crudService.cellInEditMode) {
grid.crudService.enterEditMode(cell);
cell.editValue = key;
grid1.addEventListener('keydown', (e) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be bound via the generic keydown event:

 @onkeydown="OnKeydown"
    async private void OnKeydown(KeyboardEventArgs e)
    {
        await JS.InvokeVoidAsync("keydownHandler", new object[] {e});
    }

The content of the handler can be the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added to onkeydown


var shouldAppendValue = false;

window.attachKeyDownEvent = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to go through the rendered event to bind the rest of the handlers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping it for now to register the activeNodeChange event only once, as before it was registering in the keydownhandler which was unnecessary. Once the issue with ActiveNodeChangedScript is resolved this can be removed

@dkamburov
Copy link
Contributor

@tishko0 I see no commits after the comments, please address them.

@tishko0 tishko0 requested a review from MayaKirova September 18, 2025 10:35
@dkamburov
Copy link
Contributor

@tishko0 please resolve conflicts

@tishko0
Copy link
Contributor Author

tishko0 commented Sep 24, 2025

only conflicts i fixed were updates on deleted files from my branch. Now after the merge the grid is loosing focus. I will keep looking at this trying to find what is breaking this with the new version

@tishko0 tishko0 added status: in-development PR is pending development and removed status: verified PR is ready for merging labels Sep 24, 2025
@tishko0 tishko0 removed the status: in-development PR is pending development label Sep 25, 2025
@MarielaTihova MarielaTihova added the status: in-test PR ready for testing label Sep 29, 2025
@MarielaTihova
Copy link
Contributor

@tishko0 can you please resolve the conflicts?

@MarielaTihova MarielaTihova added status: verified PR is ready for merging and removed status: in-test PR ready for testing labels Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: verified PR is ready for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excel style editing sample doesn't start editing once a cell is selected

4 participants