We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Null Column Error while binding Grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

45840 Jun 29,2006 08:24 AM UTC Jun 29,2006 06:18 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
manoj singh
Asked On June 29, 2006 08:24 AM UTC

Hi, I am binding Essential Grid with my DataTable source. This datatable source has some Blank(Null) values in specific columns for certain rows while other rows has value for that column. I am able to loop through datatable but when i try bind to Grid control it is giving error. Code Snippet:- ----------------- Dim test As New ReportData Trace.Warn("Report Count : " & test.BindData(dtReportList, dtMyReportList, Utilities.REP_TYPE.Datatable).Rows.Count) Dim dt As DataTable = test.BindData(dtReportList, dtMyReportList, Utilities.REP_TYPE.Datatable) Trace.Warn("Report Row Count : " & dt.Rows.Count) Trace.Warn("Report Column Count : " & dt.Columns.Count) Dim j As Integer = dt.Rows.Count Dim k As Integer = dt.Columns.Count Dim i, l As Integer For i = 0 To j - 1 For l = 0 To k - 1 Trace.Warn(dt.Rows(i)(l)) Next Next Me.GridGroupingControl1.DataSource = dt Me.GridGroupingControl1.DataBind() =================================== Error Msg :- "Value cannot be null. Parameter name: viewName " Stack Trace: [ArgumentNullException: Value cannot be null. Parameter name: viewName] System.Web.UI.DataSourceView..ctor(IDataSource owner, String viewName) +2038891 System.Web.UI.WebControls.ReadOnlyDataSource.System.Web.UI.IDataSource.GetView(String viewName) +65 System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +226 System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +16 Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.OnLoad(EventArgs e) +114 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 Regards, Manoj Singh

Administrator [Syncfusion]
Replied On June 29, 2006 06:18 PM UTC

Hi Manoj, This error is because of our ''GridGroupingControl'' expects its DataMember to be set to a valid value. so you will have to specify DataMember="DefaultView" in your code as follows. [vb] Me.GridGroupingControl1.DataMember = "DefaultView" This can also be null value in our upcoming versions and will not be mandatory there after. Regards, A.Sivakumar

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;