473,573 Members | 2,827 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

grid error

I use this code to fill a grid.
SqlConnection conn = null;

string TableName="";
conn = new

SqlConnection(s Conn);


SqlCommand cmd = new SqlCommand("Rec epiesSearch", conn);

cmd.CommandType = CommandType.Sto redProcedure;

cmd.Connection = conn;

cmd.Parameters. Add (new SqlParameter ("@Name", tbName.Text ));

cmd.Parameters. Add( new System.Data.Sql Client.SqlParam eter( "@tbl",
System.Data.Sql DbType.NVarChar , 50, System.Data.Par ameterDirection .Output,
true, ((System.Byte)( 0)), ((System.Byte)( 0)), "tbl",
System.Data.Dat aRowVersion.Cur rent, null));

cmd.ExecuteNonQ uery();

TableName = cmd.Parameters["@tbl"].Value.ToString ();
gridSearch.Data Member = "";
SqlDataAdapter adap = new SqlDataAdapter( );

adap.SelectComm and = cmd;

DataSet ds = new DataSet ();

adap.Fill (ds, TableName);

gridSearch.Data Source = ds;

gridSearch.Data Member = TableName;

But, I get an error after gridSearch.Data Member = TableName : " Cannot
create a child list for field Cakes".

Dec 13 '05 #1
0 844

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that field... This grid displayes results based on users search.. public static int numberDiv; private void Page_Load(object sender, System.EventArgs e) {
by: Filippo Pandiani | last post by:
I have a grid that shows the file list from a folder. On the postback, how do I get a Dataset from this grid? Thanks, Filippo.
by: Carlos Lozano | last post by:
Hello Folks! I have a grid that populates from a table on SQL Server. All datetime with DBNull value show 1/1/1900 12:00AM ... Instead of just blank (""). I found a document with the following code, but didn't work. public void setGridColumnStyle() { DataGridColumnStyle newColStyle;
by: Nikhil Patel | last post by:
Hi all, I have written an ASP.Net form that displays a sortable grid. I works fine in Internet Explorer. But it gives me an error when I try to display it in 3rd party application. The error says something like "object expected" in the following line: <td nowrap="nowrap"><a href="javascript:__doPostBack('dgProposals$_ctl1$_ctl0','')"...
by: inr | last post by:
Hi All, Currently I am developing an application in C# windows based. In my application I am using the DataGrids. In one of the screen I have two grids, in which, all the files processed will be displayed in the First grid. On clicking a row(a file) in the first grid the error description for that file will be displayed in the second grid....
by: mrbadboy | last post by:
Hi, Im not able to find where getRowValues() function is defined in the grid framework. Can anybody help me to find where the function is defined or Can anybody explain how getRowValues() works in with the flow Error : While updating row after sorting error was fixed. Initially i had sorting error in the grid.
by: mdock | last post by:
Hello, I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on which the unit was shipped. If the unit was not shipped, obviously there is no order number; the default value of this field on the data table is 0. ...
by: gaya3 | last post by:
Hi, can anyone find error in the following example <%@ include file="JspBean.jsp" %> <%@ page import="java.util.*"%> <html> <head> <%
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property grid doesn't show colloections i.e. if I have a List<Objectthen the Collection is shown but when I click on the "..." button next to it nothing...
by: pragadheesh | last post by:
I have a TAB where a data grid gets displayed. I want to access the elements of the datagrid. but i'm getting the following error. "Data cannot be read from a DataGrid which is not bound to a DataTable". But the thing is, in the TAB where the data grid gets displayed, i have kept a button (btnTestCase), and i'm able to access the data grid...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.