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

grid error

Thread ID:





38307 Dec 9,2005 02:59 PM UTC Dec 12,2005 10:17 AM UTC WinForms 2
Tags: GridControl
Hrvoje Voda
Asked On December 9, 2005 02:59 PM UTC

I''m using this code to fill databoundgrid SqlConnection conn = null; string imeTablice=""; conn = new SqlConnection(sConn); conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "dbo.[ReceptiSearch]"; cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = conn; cmd.Parameters.Add (new SqlParameter ("@Naziv", tbNaziv.Text )); cmd.Parameters.Add( new System.Data.SqlClient.SqlParameter( "@tbl", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Output, true, ((System.Byte)(0)), ((System.Byte)(0)), "tbl", System.Data.DataRowVersion.Current, null)); cmd.ExecuteNonQuery(); TableName = cmd.Parameters["@tbl"].Value.ToString(); gridSearch.Grid.DataMember = ""; SqlDataAdapter adap = new SqlDataAdapter(); adap.SelectCommand = cmd; DataSet ds = new DataSet (); adap.Fill (ds, TableName); gridSearch.Grid.DataSource = ds; gridSearch.Grid.DataMember = TableName; I get an error : Cannot create a child list for field Cakes.

Administrator [Syncfusion]
Replied On December 9, 2005 03:40 PM UTC

Something to try. Instead of setting both grid.DataSource and grid.DataMember, just set grid.DataSource = dataSet.Tables[TableName]; to see if that avoids this problem. Is that the exact message you get? If so, the message is not coming from the grid library as that string is not present in the library. If you replace the GridDataBoundGrid with a Windows Forms DataGrid, do you get the same message? If you step through the code, exactly what line are you seeing the error on?

Hrvoje Voda
Replied On December 12, 2005 10:17 AM UTC

I tried withoud DataMember, but I get the same error message. It stops at gridSearch.DataSource = ds.Table [tableName];


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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