More in this section
Forums / Sitefinity SDK / Custom module: sort by custom field

Custom module: sort by custom field

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
5 posts, 0 answered
  1. jocelyn payneau
    jocelyn payneau avatar
    51 posts
    07 Dec 2009
    29 Jan 2011
    Link to this post

    I develop a custom module to manage a list of agents. An agent is defined by a lastname, a firstname, an address...

    Here is the declaration of the "lastname" field in my model.
    [CommonProperty, DataMember, Sortable, UserFriendlyDataType(UserFriendlyDataType.ShortText)]
           public string LastName
                   return this.lastName;
                   this.lastName = value;

    Here is the definition of my gridview:
    var contactsGridView = new MasterGridViewElement(backendContentView.ViewsConfig)
                   ViewName = ContactsDefinitions.BackendListViewName,
                   ViewType = typeof(MasterGridView),
                   AllowPaging = true,
                   DisplayMode = FieldDisplayMode.Read,
                   ItemsPerPage = 50,
                   ResourceClassId = typeof(ContactsResources).Name,
                   SearchFields = "LastName, FirstName",
                   SortExpression = "LastName ASC",
                   Title = "ContactsViewTitle",
                   WebServiceBaseUrl = "~/Sitefinity/Services/Content/Contacts.svc/"

    When i go to my page to create a new contact I have a loop javascript alert with this message:
    Could not deserialize service response, because it was empty or not a valid JSON.

    Do you have any idea of what causes this error?


  2. Teodor
    Teodor avatar
    52 posts
    24 Sep 2012
    01 Feb 2011
    Link to this post
    Hello jocelyn,

    Please can you send a sample project with DB to check the problem locally.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Suranga
    Suranga avatar
    12 posts
    22 Mar 2010
    07 Aug 2011
    Link to this post
    I'm having same exact issue. Do you have any advice please?
  4. Milena
    Milena avatar
    75 posts
    27 Sep 2017
    10 Aug 2011
    Link to this post
    Hi Su,

    It is clear that problem is with deserialization of web service response, but  we need more information about the data that cause this issue at custom implementation.

    Can you send us your configuration and database that can give us a clue what is the problem ?

    Thanks in advance!

    Kind regards,

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  5. Suranga
    Suranga avatar
    12 posts
    22 Mar 2010
    13 Aug 2011
    Link to this post
    Thank you for your reply. I managed to find the issue. I forgot to add entries to the Resources file for my new fields. After that it did work.

    Thanks again.
5 posts, 0 answered