Skip to main content

I have a custom control that executes a SmartObject List method to return some values. I can't seem to find a way to order the results based on a column. Is there a way to do this? Here is how I am executing my list method:

 

SmartObject smartObject = serverName.GetSmartObject("MySmartObject");
smartObject.MethodToExecute = "List";
smartObject.GetMethod("List").InputPropertiess"deleted"].Value = "no";

I was expecting to be able to do something like: 

 

smartObject.orderBy = "columnName";

 

Thanks,

I have now figured this out. For anyone else who may stumble upon this question, you can order your results with the following line:

 

smartObject.ListMethodss"List"].OrderBy.Add(smartObject.GetMethod("List").ReturnPropertiess"Sequence"], OrderByDirection.ASC); //Order results by 'Sequence' column

Reply