DataGrid row selection before command when clicking delete button #4942
Replies: 9 comments 13 replies
-
Can you please provide us with a reproducable? https://blazorise.com/docs/extensions/datagrid/features/editing |
Beta Was this translation helpful? Give feedback.
-
your 2nd link seems to work more like what we need. coming up with code example now - it's proprietary. |
Beta Was this translation helpful? Give feedback.
-
I can't seem to paste the code here w/o losing some of it |
Beta Was this translation helpful? Give feedback.
-
<DataGrid TItem="ItemType"
</DataGrid> @code {
} |
Beta Was this translation helpful? Give feedback.
-
@David-Moreira - reproducable provided-ish |
Beta Was this translation helpful? Give feedback.
-
hello @RealityMasque can you please try to paste the code again? To properly format it inside of a block code, you need to make it like in markdown specs, see https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code |
Beta Was this translation helpful? Give feedback.
-
Hello, this should fix it:
Making it so the click is not propagated up to the row. let us know if this helped. |
Beta Was this translation helpful? Give feedback.
-
without @OnClick:stopPropagation, when I click the delete buttons infrequently, every item gets deleted. with @OnClick:stopPropagation, some of the items remain, & the delete button remains after being clicked & stop firing the DeleteKey() method. |
Beta Was this translation helpful? Give feedback.
-
we decided to go with using an "are you sure?" modal to avoid the clicking delete repeatedly |
Beta Was this translation helpful? Give feedback.
-
Hi,
New to Blazorise, & having a bit of difficulty. I have a delete button per row, but depending on how fast I click, either the row is selected, the delete icon is selected, or the command is actually invoked. I've tried a number of potential fixes found here & across the web, but none seem to help.
Help?
Thanks,
Orion
Beta Was this translation helpful? Give feedback.
All reactions