This is a migrated thread and some comments may be shown as answers.

Value cannot be null. Parameter name: key

8 Answers 308 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 2
Veteran
Jon asked on 27 Jun 2015, 11:21 AM

Doing something stupid here but cant figure it out, simple page with a grid on it pulling data from an object data source. Stored proc works and brings back columns I expect as listed in the markup

But get:

Value cannot be null.
Parameter name: key
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: key

 Mark-up:

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy2" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
 
    <telerik:RadGrid ID="RadGrid" AllowPaging="true" Skin="Bootstrap" ShowStatusBar="true"
                PageSize="15" DataSourceID="ObjDSSubs" GridLines="None" AllowSorting="true"       
                AutoGenerateColumns="false" runat="server" AllowFilteringByColumn="true"
                ShowFooter="True" ShowHeader="true"  width="100%">           
                    <clientsettings allowkeyboardnavigation="false">
                        <Selecting AllowRowSelect="true" />
                    </clientsettings>
                    <GroupingSettings CaseSensitive="false" />
                    <mastertableview datakeynames="Task_UUID">
                    <Columns>
 
                        <telerik:GridTemplateColumn UniqueName="Task_Title" AllowSorting="true" DataField="Task_Title" HeaderText="Task" ShowFilterIcon="false" AutoPostBackOnFilter="true" AllowFiltering="true">
                            <ItemTemplate><%#Eval("Task_Title")%></ItemTemplate>
                        </telerik:GridTemplateColumn>            
 
                        <telerik:GridTemplateColumn UniqueName="Task_Details" AllowSorting="true" DataField="Task_Details" HeaderText="DEtails" AllowFiltering="false">
                            <ItemTemplate><%#Eval("Task_Details")%></ItemTemplate>
                        </telerik:GridTemplateColumn>            
                         
                        <telerik:GridTemplateColumn UniqueName="Task_Date" AllowSorting="true" DataField="Task_Date" HeaderText="Date"  ShowFilterIcon="false" AutoPostBackOnFilter="true" AllowFiltering="true">
                            <ItemTemplate><%#Eval("Task_Date")%></ItemTemplate>
                        </telerik:GridTemplateColumn>     
                         
                        <telerik:GridTemplateColumn UniqueName="Task_Type" AllowSorting="true" DataField="Task_Type" HeaderText="Task_Type" ShowFilterIcon="false" AutoPostBackOnFilter="true" AllowFiltering="true">
                            <ItemTemplate><%#Eval("Task_Type")%></ItemTemplate>
                        </telerik:GridTemplateColumn>                                                                                                                                                                                                            
                         
                        <telerik:GridTemplateColumn HeaderStyle-Width="15%" AllowFiltering="false">
                            <ItemTemplate>
                                <div class="btn-group">
                                    <a href='/eupdate/edittask.aspx?id=<%#Eval("Task_UUID")%>' class='btn btn-sm btn-success'><i class="glyphicon glyphicon-pencil"></i></a>
                                    <a data-uuid='<%#Eval("Task_UUID")%>' title="Delete task" class='deletetask btn btn-sm btn-danger'><i class="glyphicon glyphicon-remove"></i></a>
                                </div>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                                                           
                    </Columns>
                    </mastertableview>
                    <pagerstyle mode="NextPrev" AlwaysVisible="true" />
    </telerik:RadGrid>
    <div class="margin">
        <asp:Button ID="ButAdd" runat="server" Text="Add Task" cssclass="btn btn-sm btn-info" />
    </div>
    <asp:ObjectDataSource ID="ObjDSSubs" runat="server" SelectMethod="Fetch" TypeName="cms.Tasks">
        <SelectParameters>
            <asp:Parameter Name="Task_UUID" Type="string" DefaultValue="" />
        </SelectParameters>
    </asp:ObjectDataSource>

 

 Here's the Stack Trace

[ArgumentNullException: Value cannot be null.
Parameter name: key]
   System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +11702869
   System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +13
   Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetLiteralTraceData(LiteralControl literal, TraceData& data) +97
   Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetTraceData(Object renderedObject) +421
   Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject) +79
   System.Web.UI.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject) +66
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +170
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriter writer) +35
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.WebControls.Table.RenderContents(HtmlTextWriter writer) +9667840
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriter writer) +35
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   Telerik.Web.UI.GridMultiRowItem.Render(HtmlTextWriter writer) +289
   Telerik.Web.UI.GridTFoot.Render(HtmlTextWriter writer) +36
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.GridTable.RenderContents(HtmlTextWriter writer) +955
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   Telerik.Web.UI.GridTable.Render(HtmlTextWriter writer) +4131
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12
   Telerik.Web.UI.GridTableViewBase.Render(HtmlTextWriter writer) +49
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12
   Telerik.Web.UI.RadCompositeDataBoundControl.RenderContents(HtmlTextWriter writer) +36
   Telerik.Web.UI.RadGrid.RenderContents(HtmlTextWriter writer) +103
   Telerik.Web.UI.GridBaseDataList.Render(HtmlTextWriter writer) +132
   Telerik.Web.UI.RadGrid.Render(HtmlTextWriter writer) +217
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer) +161
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Control.Render(HtmlTextWriter writer) +12
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +256
   System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +37
   Telerik.Web.UI.OurUpdatePanel.Render(HtmlTextWriter writer) +464
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +208
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Control.Render(HtmlTextWriter writer) +12
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +106
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Control.Render(HtmlTextWriter writer) +12
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +1090
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1405

 

8 Answers, 1 is accepted

Sort by
0
Sergiu
Top achievements
Rank 1
answered on 28 Jun 2015, 01:15 PM

Hey Jon,

I am seeing the same issue after updating the ASP.NET AJAX to the Q2 2015 build yesterday. Any page with a RadGrid instance on it will throw an error. I assume there is a bug in the new build and reverted back to the Q1 2015, which works fine.

Hope you get a reply soon from their support staff!

 Sergiu

0
Jon
Top achievements
Rank 2
Veteran
answered on 28 Jun 2015, 01:17 PM
0
Sergiu
Top achievements
Rank 1
answered on 28 Jun 2015, 01:21 PM
Thank you! This is helpful to know!
0
Leo
Top achievements
Rank 2
answered on 08 Jul 2015, 04:06 PM
Wow I was struggling with the same issue. Thanks for sharing that!
0
Maria Ilieva
Telerik team
answered on 09 Jul 2015, 08:59 AM
Hi,

Note that this problem is already fixed and the fix is included in the previous internal build and will be part of the upcoming SP1.

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ralf
Top achievements
Rank 2
answered on 14 Jul 2015, 10:25 PM

It costs me one day! 

When you publish the SP for that?

0
Konstantin Dikov
Telerik team
answered on 15 Jul 2015, 01:09 PM
Hi Ralf,

The Q2 2015 SP1 is scheduled for July 29 and if everything goes as planned, the SP1 should be available for downloading then.

Once again, please excuse us for any inconvenience caused by this.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Avi
Top achievements
Rank 1
answered on 23 Jul 2015, 10:25 AM
Thanks a ton JON. I was struggling with it and wasted my time in poking in my code.
Tags
Grid
Asked by
Jon
Top achievements
Rank 2
Veteran
Answers by
Sergiu
Top achievements
Rank 1
Jon
Top achievements
Rank 2
Veteran
Leo
Top achievements
Rank 2
Maria Ilieva
Telerik team
Ralf
Top achievements
Rank 2
Konstantin Dikov
Telerik team
Avi
Top achievements
Rank 1
Share this question
or