Custom module: sort by custom field
Hello,
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
get
return
this
.lastName;
set
this
.lastName = value;
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/"
;
Could not deserialize service response, because it was empty or not a valid JSON.
Hello jocelyn,
Please can you send a sample project with DB to check the problem locally.
Best wishes,
Teodor
the Telerik team
I'm having same exact issue. Do you have any advice please?
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,
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.