473,546 Members | 2,244 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unknown method

I'm using windows forms!
-----Original Message-----
Are you using ASP.NET or Windows Form? Only Windows FormsDataGrid support that method.

Tu-Thach
-----Original Message-----
I'm using the following codesample:
myDataGrid.Se tDataBinding(my DataSet, "Customers" );
I used the code example from the Microsoft .NET help filebut the interesting thing is, that the
method "SetDataBinding " is unknown!

Is it possible, that something is missing or wrong in myinstallatio n?
please can you help me?

Thanks...
.

.

Nov 15 '05 #1
3 2480
Please post part of your code.

Tu-Thach
-----Original Message-----
I'm using windows forms!
-----Original Message-----
Are you using ASP.NET or Windows Form? Only Windows

Forms
DataGrid support that method.

Tu-Thach
-----Original Message-----
I'm using the following codesample:
myDataGrid.S etDataBinding(m yDataSet, "Customers" );
I used the code example from the Microsoft .NET helpfilebut the interesting thing is, that the
method "SetDataBinding " is unknown!

Is it possible, that something is missing or wrong inmyinstallation ?
please can you help me?

Thanks...
.

.

.

Nov 15 '05 #2
here are parts of my used code:
using System;
using System.Componen tModel;
using System.Drawing;
using System.Collecti ons;
using System.Windows. Forms;
using System.Data;
using System.Globaliz ation;

.....
private System.Windows. Forms.DataGridT extBoxColumn
dataGridTextBox Column1;
private System.Windows. Forms.DataGrid dataGrid1;
private System.Data.Dat aSet myDataSet;
....

private void MakeDataTables( )
{
// Run all of the functions.
MakeParentTable ();
MakeChildTable( );
MakeDataRelatio n();
BindToDataGrid( );
}

private void MakeParentTable ()
{
// Create a new DataTable.
System.Data.Dat aTable myDataTable = new DataTable
("ParentTable") ;

// Declare variables for DataColumn and DataRow objects.
DataColumn myDataColumn;
DataRow myDataRow;

myDataColumn = new DataColumn();
myDataColumn.Da taType = System.Type.Get Type
("System.Int32" );
myDataColumn.Co lumnName = "id";
myDataColumn.Re adOnly = true;
myDataColumn.Un ique = true;
// Add the Column to the DataColumnColle ction.
myDataTable.Col umns.Add(myData Column);

// Create second column.
myDataColumn = new DataColumn();
myDataColumn.Da taType = System.Type.Get Type
("System.String ");
myDataColumn.Co lumnName = "ParentItem ";
myDataColumn.Au toIncrement = false;
myDataColumn.Ca ption = "ParentItem ";
myDataColumn.Re adOnly = false;
myDataColumn.Un ique = false;
// Add the column to the table.
myDataTable.Col umns.Add
(myDataColumn);

// Make the ID column the primary
key column.
DataColumn[] PrimaryKeyColum ns =
new DataColumn[1];
PrimaryKeyColum ns[0] =
myDataTable.Col umns["id"];
myDataTable.Pri maryKey =
PrimaryKeyColum ns;

// Instantiate the DataSet
variable.
myDataSet = new DataSet();
// Add the new DataTable to the
DataSet.
myDataSet.Table s.Add(myDataTab le);

// Create three new DataRow
objects and add them to the DataTable
for (int i = 0; i<= 2; i++)
{
myDataRow =
myDataTable.New Row();
myDataRow["id"] = i;
myDataRow["ParentItem "]
= "ParentItem " + i;
myDataTable.Row s.Add
(myDataRow);
}
}

private void MakeChildTable( )
{
// Create a new DataTable.
DataTable myDataTable = new
DataTable("chil dTable");
DataColumn myDataColumn;
DataRow myDataRow;

// Create first column and add to
the DataTable.
myDataColumn = new DataColumn();
myDataColumn.Da taType=
System.Type.Get Type("System.In t32");
myDataColumn.Co lumnName
= "ChildID";
myDataColumn.Au toIncrement = true;
myDataColumn.Ca ption = "ID";
myDataColumn.Re adOnly = true;
myDataColumn.Un ique = true;
// Add the column to the
DataColumnColle ction.
myDataTable.Col umns.Add
(myDataColumn);

// Create second column.
myDataColumn = new DataColumn();
myDataColumn.Da taType=
System.Type.Get Type("System.St ring");
myDataColumn.Co lumnName
= "ChildItem" ;
myDataColumn.Au toIncrement =
false;
myDataColumn.Ca ption
= "ChildItem" ;
myDataColumn.Re adOnly = false;
myDataColumn.Un ique = false;
myDataTable.Col umns.Add
(myDataColumn);

// Create third column.
myDataColumn = new DataColumn();
myDataColumn.Da taType=
System.Type.Get Type("System.In t32");
myDataColumn.Co lumnName
= "ParentID";
myDataColumn.Au toIncrement =
false;
myDataColumn.Ca ption = "ParentID";
myDataColumn.Re adOnly = false;
myDataColumn.Un ique = false;
myDataTable.Col umns.Add
(myDataColumn);

myDataSet.Table s.Add(myDataTab le);
// Create three sets of DataRow
objects, five rows each, and add to DataTable.
for(int i = 0; i <= 4; i ++)
{
myDataRow =
myDataTable.New Row();
myDataRow["childID"] = i;
myDataRow["ChildItem"]
= "Item " + i;
myDataRow["ParentID"] =
0 ;
myDataTable.Row s.Add
(myDataRow);
}
for(int i = 0; i <= 4; i ++)
{
myDataRow =
myDataTable.New Row();
myDataRow["childID"] = i
+ 5;
myDataRow["ChildItem"]
= "Item " + i;
myDataRow["ParentID"] =
1 ;
myDataTable.Row s.Add
(myDataRow);
}
for(int i = 0; i <= 4; i ++)
{
myDataRow =
myDataTable.New Row();
myDataRow["childID"] = i
+ 10;
myDataRow["ChildItem"]
= "Item " + i;
myDataRow["ParentID"] =
2 ;
myDataTable.Row s.Add
(myDataRow);
}
}

private void MakeDataRelatio n()
{
// DataRelation requires two
DataColumn (parent and child) and a name.
DataRelation myDataRelation;
DataColumn parentColumn;
DataColumn childColumn;
parentColumn = myDataSet.Table s
["ParentTabl e"].Columns["id"];
childColumn = myDataSet.Table s
["ChildTable "].Columns["ParentID"];
myDataRelation = new DataRelation
("parent2Child" , parentColumn, childColumn);
myDataSet.Table s
["ChildTable "].ParentRelation s.Add(myDataRel ation);
}

private void BindToDataGrid( )
{
// Instruct the DataGrid to bind
to the DataSet, with the
// ParentTable as the topmost
DataTable.
dataGrid1.SetDa taBinding
(myDataSet,"Par entTable");
}

it's the same code from the help-file

and the effect is that the the method "SetDataBinding " is
not known for my datagrid
thanks for your help

it's also possibe to anwer me to my email adress



-----Original Message-----
Please post part of your code.

Tu-Thach
-----Original Message-----
I'm using windows forms!
-----Original Message-----
Are you using ASP.NET or Windows Form? Only Windows

Forms
DataGrid support that method.

Tu-Thach

-----Original Message-----
I'm using the following codesample:
myDataGrid. SetDataBinding( myDataSet, "Customers" );
I used the code example from the Microsoft .NET help

file
but the interesting thing is, that the
method "SetDataBinding " is unknown!

Is it possible, that something is missing or wrong in

my
installatio n?
please can you help me?

Thanks...
.

.

.

.

Nov 15 '05 #3
and the error message is:

System.Windows. Forms.DataGrid includes no definition for
SetDataBinding
what's going wrong there?
Nov 15 '05 #4

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

Similar topics

3
1924
by: Maarten van Reeuwijk | last post by:
Hello, I am using the Numeric package, and I need to strip edge cells off an array (dimension unknown) in an a-priori unknown direction. I implented this as follows: def el_remove_bcells(var, axis): """ elementary routine to strip the edge cells of an array for the given direction. """
0
2916
by: Robert | last post by:
did you solve this problem? It seems to be still present here with py2.3.5. Robert -- From: Manish Jethani <manish.j@gmx.net> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en
53
5660
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
4
662
by: David Moore | last post by:
Hello I am using the System.DirectoryServices namespace classes to access Active Directory. We connect using the LDAP://DOMAIN method. The code works on local dev boxes, and in staging, but doesn't work on a particular box in our production environment. When we try to connect and do a search, we get a "The authentication mechanism is...
6
2732
by: SHC | last post by:
Hi all, I created an application from the Console Application (.NET) of VC++ .NET 2003, and I did "Build" the application of the attached .cpp file, volcanoes.xml and geology.dtd on my VC++ .NET 2003 - Windows XP Pro PC suscessfully. But when I ran it from the command line - C:\Documents and Settings\SHC\My Documents\Visual Studio...
1
7785
by: Jung | last post by:
I am trying to make connection to Content Manager. Can anyone help me how to fix this error? Thank you. Exception in thread "main" java.lang.UnsatisfiedLinkError: SQLAllocEnv at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source) at...
9
10701
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined as a valid return value for the typeof operator in a later version of ECMAScript or is this a JScript "feature"? -- Klaus Johannes Rusch
9
3994
by: Alexander Widera | last post by:
hi, is it possible to return an object of an unknown (but not really unknown) type with an method? i have the following situation: - a variable (A) of the type "object" which contains the object - a variable (B) of the type "Type" which contains the type of the object in (A) (A should be of the type B) - a method which should return the...
1
2092
by: nelsonivan | last post by:
Hi, i'm trying to reference some objects using reflection and Late Binding accessing. The Object API to his methods it's easy to understand, and it's as "Object.Method" - aka. "Clientes.Existe"- So, to reference this object, it was simplier to me resolving this with reflection, and it was something like this:
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
Oralloy
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. ...
0
7947
jinu1996
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...
0
7794
tracyyun
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...
1
5361
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5080
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...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
747
bsmnconsultancy
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.