Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Blazor ! How do we perform (Drag & Drop) & (Resizing) in Server-side application. #14132

Closed
Indrajith-Sync opened this issue Sep 19, 2019 · 10 comments
Labels
area-blazor Includes: Blazor, Razor Components question

Comments

@Indrajith-Sync
Copy link

Describe the solution you'd like

Is there any way to perform the Drag & Drop, Resizing in the Serve-side approach with the blazor.

Additional context

Can anyone suggest a solution for it ?

@RemiBou
Copy link
Contributor

RemiBou commented Sep 19, 2019

You will have to use jsinterop for this, maybe search for package on nuget there must be something about it. I found this repo with some sample code from @chrissainty https://github.com/chrissainty/SimpleDragAndDropWithBlazor

@chrissainty
Copy link
Contributor

chrissainty commented Sep 19, 2019

I covered some drag and drop investigation I did in this blog post (which accompanies the repo @RemiBou has linked above). The solution I have in the repo and the blog post avoids using JS interop but there are limitations. For example, I couldn't find a good way to handle ordering via drag and drop.

@Indrajith-Sync
Copy link
Author

Indrajith-Sync commented Sep 19, 2019

@chrissainty later I checked you blog post. It is useful.
I there any way to Resize the element in blazor native way ?

@Indrajith-Sync
Copy link
Author

Indrajith-Sync commented Sep 19, 2019

@chrissainty Tried running your shared github repo for the drag and drop demo. Currently i am using RC1 version of blazor and from the preview 9 update this lambda expression error is thrown on passing the function call with some arguments like below.

@ondragstart="@(() => HandleDragStart(JobModel))"

Facing the below script error while launching the project in VS.
image

Can you please update your comments on it ?

@chrissainty
Copy link
Contributor

@indrajjith I've updated the code to work with RC1.

@Indrajith-Sync
Copy link
Author

@chrissainty It works now. thanks..!

@Indrajith-Sync
Copy link
Author

@chrissainty Do you have any suggestion for element Resize in Blazor native way ?

@chrissainty
Copy link
Contributor

@indrajjith You can resize elements using CSS (https://www.w3schools.com/cssref/css3_pr_resize.asp). But I don't think the onresize event is available in Blazor yet. So you would need to use some JS Interop.

@Indrajith-Sync
Copy link
Author

@chrissainty Okay.!

@blowdart blowdart added the area-blazor Includes: Blazor, Razor Components label Sep 19, 2019
@javiercn
Copy link
Member

Seems that the question has been answered. We can close this.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components question
Projects
None yet
Development

No branches or pull requests

6 participants