CutomGridView , BindGridView
I am having some problems with the BindGridView method of CustomGridView Control. Following are the error details. If anyone could help me I 'll be really thankful .......
System.MissingMethodException was unhandled by user code
Message=Method 'MFERIS.SPS.SPSCategoryEOList.SortByPropertyName' not found.
Source=mscorlib
StackTrace:
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at MFERIS.CustomGridView.BindGridView(String sortExpression, SortDirection sortDirection) in C:\Users\MUSA\Documents\VS2008\Projects\MFERIS\MFE RIS\Controls\CustomGridView.cs:line 138
at MFERIS.CustomGridView.DataBind() in C:\Users\MUSA\Documents\VS2008\Projects\MFERIS\MFE RIS\Controls\CustomGridView.cs:line 124
at MFERIS.SpareParts.Categories.Page_Load(Object sender, EventArgs e) in C:\Users\MUSA\Documents\VS2008\Projects\MFERIS\MFE RIS\SpareParts\Categories.aspx.cs:line 37
at System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
I may be wrong but in my view the problem is in the following line of code
with sortExpression
base.DataSource = objectType.InvokeMember("SortByPropertyName", BindingFlags.InvokeMethod, null, ListObject, new object[] { sortExpression, sortDirection = SortDirection.Ascending });
regards
Zia Ul Hassan
|