Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1000
Sorting problem Cannot deserialize
posted

Hi,

I have a webdatagrid were I enabled sorting, but it doesn't seem to work, I receive a javascript error.

Error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data

Here you have a sample of the webdatagrid

<ig:WebDataGrid ID="WebDataGrid1" runat="server" DataKeyFields="ID" AutoGenerateColumns="False" EnableAjax="true" Width="602px" ShowFooter="true">
<Columns>
    <ig:TemplateDataField Key="DateTime" Width="150px">
        <ItemTemplate>
            <%#DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "DateTime")%>
        </ItemTemplate>
        <Header Text="DateTime" />
    </ig:TemplateDataField>
    <ig:TemplateDataField Key="Component" Width="363px">
        <ItemTemplate>
            <%#DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "Component")%>
        </ItemTemplate>
        <Header Text="Component" />
    </ig:TemplateDataField>
    <ig:TemplateDataField Key="Sevirity" Width="65px">
        <ItemTemplate>
            <img src="img/sevirity<%#DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "Sevirity").ToString().Trim()%>.png" alt="" />
        </ItemTemplate>
        <Header Text="Sevirity" />
    </ig:TemplateDataField>
</Columns>
<Behaviors>
    <ig:Sorting SortingMode="Multi" Enabled="true">
        <ColumnSettings>
            <ig:SortingColumnSetting ColumnKey="DateTime" Sortable="true"/>
            <ig:SortingColumnSetting ColumnKey="Component" Sortable="true"/>
            <ig:SortingColumnSetting ColumnKey="Sevirity" Sortable="true"/>
        </ColumnSettings>
    </ig:Sorting>
</Behaviors>
</ig:WebDataGrid>

I have a DataTable which I bind to the WebDataGrid.

WebDataGrid1.DataSource = dt
WebDataGrid1.DataBind()

How can I fix this problem?

 

Edit:

I was able to catch the following information:

Source: Infragistics35.Web.v9.1

Class: Sorting

Stacktrace:

   at Infragistics.Web.UI.GridControls.Sorting.BehaviorEvents_PreRender(Object sender)
   at Infragistics.Web.UI.GridControls.GridBehaviorEvents.RenderingContentHandler.Invoke(Object sender)
   at Infragistics.Web.UI.GridControls.GridBehaviorEvents.OnRenderingContent()
   at Infragistics.Web.UI.GridControls.GridRenderer.RenderContents(HtmlTextWriter writer)
   at Infragistics.Web.UI.Framework.RunBot.HandleRenderContents(HtmlTextWriter writer, RendererBase renderer)
   at Infragistics.Web.UI.GridControls.WebDataGrid.GetRenderHTML()
   at Infragistics.Web.UI.GridControls.WebDataGrid.CallbackRender(CallbackObject callbackObject)
   at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.Infragistics.Web.UI.IControlCallback.CallbackRender(CallbackObject callbackObject)
   at Infragistics.Web.UI.Framework.RunBot.CallbackRenderRecursive(CallbackObject callbackObject)
   at Infragistics.Web.UI.Framework.RunBot.RenderFormCallBack(HtmlTextWriter writer, Control control)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
   at Infragistics.Web.UI.Framework.RunBot.RenderPageCallBack(HtmlTextWriter writer, Control control)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Parents Reply Children
No Data