I'm making a search list through a grid in asp.net web form.
I am using web service for loading the grid. Now how can I ascending the Request Date ??
gvproposal.DataSource = webservice.EnquiryGetAllLcRequest();
gvproposal.DataBind();
here I simply bind the web service now how can I ascending the date??
public IS_LC_REQUEST[] EnquiryGetAllLcRequest();
this is web service method.
public class IS_LC_REQUEST : CModelBaseOfIS_LC_REQUEST
{
public IS_LC_REQUEST();
public string BENEFICIARY_ADDRESS { get; set; }
public string BENEFICIARY_NAME { get; set; }
public string BRANCH_ID { get; set; }
public string PORT_OF_SHIPMENT { get; set; }
public string REQUEST_DATE { get; set; }
public string REQUEST_ID { get; set; }
}
Updated:
var arrayOfObjects = IntBankProposal.EnquiryGetAllLcRequest();
var dt = DateTime.Now;
gvproposal.DataSource = arrayOfObjects.OrderBy(load => { if (DateTime.TryParse(load.REQUEST_DATE, out dt)) { return dt; } else { return DateTime.Now.AddYears(-100); } }).ToArray();
gvproposal.DataBind();