

Server Error in '/' Application.
--------------------------------------------------------------------------------
Value cannot be null.
Parameter name: source
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: source
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: source]
System.Linq.Enumerable.Where(IEnumerable`1 source, Func`2 predicate) +2719903
Telerik.Web.UI.RadTreeList.CalculateAggregates(TreeListColumnsCollection Columns) +128
Telerik.Web.UI.RadTreeList.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +1910
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +66
Telerik.Web.UI.RadTreeList.PerformDataBinding(IEnumerable data) +2683
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
Telerik.Web.UI.RadTreeList.DataBind() +17
System.Web.UI.Control.DataBindChildren() +201
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +201
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +201
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
System.Web.UI.Control.DataBind() +15
CorpFGBillingThree.afg_invoice_views_list_Telerik.Page_Load(Object sender, EventArgs e) +1756
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
---------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
|
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
|
Server Error in '/' Application.
Collection was modified; enumeration operation may not execute.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
Source Error:
|
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
|
<
telerik:RadGrid ID="grdResult" runat="server" Width="900px"
AllowMultiRowSelection="True" AllowSorting="True" Height="400px"
style="margin-right: 1px" Skin="WebBlue" GridLines="None" AllowPaging="true" PageSize="100">
<PagerStyle Position="Top" />
<MasterTableView AllowPaging="true" AutoGenerateColumns="true" AllowMultiColumnSorting="true" ClientDataKeyNames="SRC,SER,BAND,XLA,XLG,RGN,STT,EIP,SVC,FRQ,FTA" Font-Size="Smaller" PageSize="100" >
<Columns>
<telerik:GridTemplateColumn UniqueName="SEL">
<HeaderTemplate>
<asp:CheckBox runat="server" ID="ChkAll" ToolTip="Click to select all" onclick="javascript:SelectAllCheckboxes(this);" />
</HeaderTemplate>
<HeaderStyle Width="20px" />
<ItemTemplate>
<asp:CheckBox runat="server" ID="SEL" onclick="javascript:chkRowSelection(this);" />
</ItemTemplate>
<ItemStyle Width="20px" />
</telerik:GridTemplateColumn>
</Columns>
<ItemStyle Wrap="false" />
<HeaderStyle Wrap="False" />
</MasterTableView>
<HeaderStyle Wrap="False" />
<ClientSettings ReorderColumnsOnClient="true" EnableRowHoverStyle="False" AllowColumnsReorder="true" >
<Scrolling AllowScroll="True" UseStaticHeaders="true" />
<Selecting AllowRowSelect="true" />
<Resizing EnableRealTimeResize="true" ResizeGridOnColumnResize="true" AllowColumnResize="true"/>
<ClientEvents OnRowContextMenu="grdResult_RowSelected" OnRowClick="RowClicked" />
</ClientSettings>
<Headerstyle Width="65px" />
<PagerStyle Mode="NextPrevAndNumeric" ></PagerStyle>
</
telerik:RadGrid>
javascript:
function chkRowSelection(chkBox)
{
// need to get the values of the ClientDataKeyNames="SRC,SER,BAND,XLA,XLG,RGN,STT,EIP,SVC,FRQ,FTA" for the selected row in this function.
}
Thanks,
Raji
public class SqlPageStatePersister : PageStatePersister { private const string VSKEY = "__VSKEY"; private const string VSPREFIX = "VIEWSTATE_"; private static readonly PageViewStateRepository Repository = new PageViewStateRepository(); public SqlPageStatePersister(Page page) : base(page) { } public override void Load() { if (!Page.IsPostBack) return; string vsKey = Page.Request.Form[VSKEY]; // Sanity Checks if (string.IsNullOrEmpty(vsKey)) throw new ViewStateException(); if (!vsKey.StartsWith(VSPREFIX)) throw new ViewStateException(); IStateFormatter frmt = StateFormatter; string state = GetViewState(vsKey); if (string.IsNullOrEmpty(state)) return; var statePair = frmt.Deserialize(state) as Pair; if (statePair == null) return; ViewState = statePair.First; ControlState = statePair.Second; } public override void Save() { if (Page.Session == null) throw new InvalidOperationException("Session is required for SqlPageStatePersister (SessionID -> Key)"); if (ViewState != null || ControlState != null) { string vsKey; if (!Page.IsPostBack) { string sessionId = Page.Session.SessionID; string pageUrl = Page.Request.Path; vsKey = string.Format("{0}{1}_{2}_{3}", VSPREFIX, pageUrl, sessionId, DateTime.Now.Ticks); } else { vsKey = Page.Request.Form[VSKEY]; if (string.IsNullOrEmpty(vsKey)) throw new ViewStateException(); } IStateFormatter frmt = StateFormatter; string state = frmt.Serialize(new Pair(ViewState, ControlState)); StoreViewState(vsKey, state); Page.Cache.Add(vsKey, vsKey, null, DateTime.Now.AddMinutes(Page.Session.Timeout), Cache.NoSlidingExpiration, CacheItemPriority.Low, ViewStateCacheRemoveCallback); Page.ClientScript.RegisterHiddenField(VSKEY, vsKey); } } #region Database private static void StoreViewState(string key, string viewStateData) { var item = new PageViewState {ID = key, Value = viewStateData, LastUpdatedOn = DateTime.Now}; Repository.InsertOrUpdate(item); } private static string GetViewState(string key) { PageViewState vs = Repository.Select(key); if (vs != null) return vs.Value; return string.Empty; } private static void ViewStateCacheRemoveCallback(string key, object value, CacheItemRemovedReason reason) { Repository.Delete(Repository.Select(key)); } #endregion }}public class SqlPageAdapter : PageAdapter{ public override PageStatePersister GetStatePersister() { return new SqlPageStatePersister(Page); }}<browsers> <browser refID="Default"> <controlAdapters> <adapter controlType="System.Web.UI.Page" adapterType="DataValidator.PageState.SqlPageAdapter" /> </controlAdapters> </browser></browsers><telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" CellSpacing="0" GridLines="None" OnNeedDataSource="NeedDataSource" AllowSorting="True" AutoGenerateColumns="False" OnItemDataBound="RadGrid1_ItemDataBound" EnableViewState="True" OnItemCommand="RadGrid1_ItemCommand"> <MasterTableView DataKeyNames="ID" PageSize="20" CommandItemDisplay="Top" EnableViewState="True"> <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true"> </CommandItemSettings> <Columns> <telerik:GridBoundColumn DataField="Version" HeaderText="Version" SortExpression="Version" UniqueName="Version" FilterControlWidth="95px" /> <telerik:GridDateTimeColumn DataField="Date" HeaderText="Date" SortExpression="Date" UniqueName="Date" FilterControlWidth="95px" PickerType="DatePicker" EnableTimeIndependentFiltering="true" /> <telerik:GridBoundColumn DataField="Level" HeaderText="Level" SortExpression="Level" UniqueName="Level" FilterControlWidth="95px" /> <telerik:GridBoundColumn DataField="Message" HeaderText="Type" SortExpression="Message" UniqueName="Message" FilterControlWidth="95px" /> <telerik:GridBoundColumn DataField="Exception" HeaderText="Message" SortExpression="Exception" UniqueName="Exception"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" SortExpression="UserName" UniqueName="UserName" FilterControlWidth="95px" /> <telerik:GridBoundColumn DataField="Page" HeaderText="Page" SortExpression="Page" UniqueName="Page" FilterControlWidth="95px" /> </Columns> </MasterTableView> <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true"> <Excel Format="Biff"></Excel> </ExportSettings> <FilterMenu EnableImageSprites="False"> </FilterMenu> <PagerStyle Mode="NumericPages"></PagerStyle></telerik:RadGrid>namespace DataValidator._uc{ public partial class LogCtrl : UserControlHelper, IGridUserControl { protected void Page_Load(object sender, EventArgs e) { } #region Implementation of IGridUserControl public void NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { var lr = new LogRepository(); RadGrid1.DataSource = lr.Select(); } public void UpdateCommand(object sender, GridCommandEventArgs e) { } public void DeleteCommand(object sender, GridCommandEventArgs e) { } public void InsertCommand(object sender, GridCommandEventArgs e) { } #endregion protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { var log = (Log) e.Item.DataItem; if (log != null) { string message = log.Exception; if (message.Length > 100) message = string.Format("{0}...", message.Substring(0, 46)); e.Item.Cells[6].Wrap = false; e.Item.Cells[6].ToolTip = log.Exception; e.Item.Cells[6].Text = message; } } } protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == RadGrid.ExportToExcelCommandName) { PageHelper.Exporting = true; } } }}<dynamic:DynamicRadGrid ID="RadGrid1" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="false" PageSize="15" PagerStyle-Mode="NextPrevAndNumeric" runat="server" DataSourceID="GridDataSource" AllowAutomaticUpdates="true" AllowAutomaticInserts="true" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound " AllowAutomaticDeletes="true" OnPageIndexChanged="RadGrid1_PageIndexChanged" OnDataBound="RadGrid1_DataBound"> <ExportSettings ExportOnlyData="true" IgnorePaging="true" Excel-Format="ExcelML" OpenInNewWindow="true"> </ExportSettings> <MasterTableView CommandItemDisplay="Top" UseAllDataFields="true"> <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true" /> </MasterTableView> <ClientSettings EnablePostBackOnRowClick="true"> <Selecting AllowRowSelect="true" /> </ClientSettings> </dynamic:DynamicRadGrid> <asp:EntityDataSource ID="GridDataSource" runat="server" EnableDelete="true" EnableUpdate="true" /> <asp:QueryExtender ID="GridQueryExtender" TargetControlID="GridDataSource" runat="server"> <asp:DynamicFilterExpression ControlID="FilterRepeater" /> </asp:QueryExtender>protected void Page_Init(object sender, EventArgs e) { table = DynamicDataRouteHandler.GetRequestMetaTable(Context); RadGrid1.SetMetaTable(table, table.GetColumnValuesFromRoute(Context)); FormView1.SetMetaTable(table); GridDataSource.EntityTypeFilter = table.EntityType.Name; DetailsDataSource.EntityTypeFilter = table.EntityType.Name; }