0

I have an image gallery implemented with the below simple class. Until now it was displaying in the order it was being uploaded on the server, so it will sort by uploaded date in the table.

But now client has an requirement of reordering the images after they are uploaded on the server. How do I achieve this sorting once images are tagged in the database.

public class Gallery
{
    public int GalleryID { get; set; }
    public string GalleryBoatId { get; set; }

    public string Image { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
    public string Featured { get; set; }

    public int Sort { get; set; }
    public string DateTimeStamp { get; set; }
}

I have tried the option of putting the dropdown list in front of every image, which client can choose & reorder. But it is not feasible in all scenario. Because if client chooses a SortNo as 2, he has change the existing number 2 image sequence. With many combination, it is a uphill task if there are 40-50 images to sequence.

I couldn't find any solution in Stackoverflow, or I might not searched properly. Please guide.

So what they are asking is to have provision to do drag & drop which will store the sequence, the way they place on the screen.

4
  • 1
    Does the sample useful to you? And here is the dragsort file. Commented Jun 17, 2024 at 3:13
  • Yes Jason, it is leading me towards what I was expecting, I am just playing with your sample code. thank you so much for helping me out. Commented Jun 17, 2024 at 11:43
  • Also Json, is this Website: dragsort.codeplex.com active, as it did not open for you. Commented Jun 17, 2024 at 11:46
  • 1
    Hi Rajiv, Yes, this project seems to have stopped maintenance. I'm just looking for a suitable front-end framework for you to refer to. Commented Jun 18, 2024 at 5:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.