private void ChangeView(ISPCView selectedView) { SortedFieldName = String.Empty; IsAsc = true; CurrentPageIndex = 0; ListItemCollectionPositionNexts = new NameValueCollection(); ListItemCollectionPositionNexts.Add("0", String.Empty); string listItemCollectionPositionNext = String.Empty; int itemCount; string currentListItemCollectionPositionNext = ListItemCollectionPositionNexts[(CurrentPageIndex).ToString()]; List <ISPCItem> items = OutlookConnector.GetConnector(selectedView.SiteSetting).GetListItems(SelectedFolder, selectedView, SortedFieldName, IsAsc, CurrentPageIndex, currentListItemCollectionPositionNext, CustomFilters, out listItemCollectionPositionNext, out itemCount); EUView view = selectedView as EUView; if (view != null) { SelectedView = SharePointManager.GetView(view.WebURL, view.ListName, view.Name, view.SiteSetting); } else { SelectedView = selectedView; } object[] args = new object[4] { SelectedView, items, listItemCollectionPositionNext, itemCount }; this.Invoke(new UpdateContentDataGridViewHandler(UpdateContentDataGridView), args); }