473,474 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Key not found" Exception Assigning to DataSource Property of Grid

This is driving me mad. Can someone please put me out of my misery?

I have a DataSet which I wish to use as the data source for a grid control
(it is actually an Infragistics grid). When I assign to the DataSource
property like this

UltraGrid1.DataSource = MyDataSet

I get the following exception:

Key not found
Parameter name: key

The dataset has six columns, and it doesn't make any difference whether I
create the columns in advance in the grid or not. I have checked
meticulously that the grid has columns that exactly correspond to the
columns in the dataset; no more and no fewer.

Any ideas chaps?

TIA

Charles
Jun 4 '06 #1
3 2577
Charles,

Exact specifying the Table maybe

You can as well try the DataMember for that.

Cor

"Charles Law" <bl***@nowhere.com> schreef in bericht
news:O3**************@TK2MSFTNGP05.phx.gbl...
This is driving me mad. Can someone please put me out of my misery?

I have a DataSet which I wish to use as the data source for a grid control
(it is actually an Infragistics grid). When I assign to the DataSource
property like this

UltraGrid1.DataSource = MyDataSet

I get the following exception:

Key not found
Parameter name: key

The dataset has six columns, and it doesn't make any difference whether I
create the columns in advance in the grid or not. I have checked
meticulously that the grid has columns that exactly correspond to the
columns in the dataset; no more and no fewer.

Any ideas chaps?

TIA

Charles

Jun 4 '06 #2
Hi Cor

I'm not sure I follow you. The dataset contains only one table. I have also
tried using a datatable object as the data source, but I get the same
exception.

Charles
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Charles,

Exact specifying the Table maybe

You can as well try the DataMember for that.

Cor

"Charles Law" <bl***@nowhere.com> schreef in bericht
news:O3**************@TK2MSFTNGP05.phx.gbl...
This is driving me mad. Can someone please put me out of my misery?

I have a DataSet which I wish to use as the data source for a grid
control (it is actually an Infragistics grid). When I assign to the
DataSource property like this

UltraGrid1.DataSource = MyDataSet

I get the following exception:

Key not found
Parameter name: key

The dataset has six columns, and it doesn't make any difference whether I
create the columns in advance in the grid or not. I have checked
meticulously that the grid has columns that exactly correspond to the
columns in the dataset; no more and no fewer.

Any ideas chaps?

TIA

Charles


Jun 5 '06 #3
Problem solved. Mea culpa.

Charles
"Charles Law" <bl***@nowhere.com> wrote in message
news:uA**************@TK2MSFTNGP04.phx.gbl...
Hi Cor

I'm not sure I follow you. The dataset contains only one table. I have
also tried using a datatable object as the data source, but I get the same
exception.

Charles
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Charles,

Exact specifying the Table maybe

You can as well try the DataMember for that.

Cor

"Charles Law" <bl***@nowhere.com> schreef in bericht
news:O3**************@TK2MSFTNGP05.phx.gbl...
This is driving me mad. Can someone please put me out of my misery?

I have a DataSet which I wish to use as the data source for a grid
control (it is actually an Infragistics grid). When I assign to the
DataSource property like this

UltraGrid1.DataSource = MyDataSet

I get the following exception:

Key not found
Parameter name: key

The dataset has six columns, and it doesn't make any difference whether
I create the columns in advance in the grid or not. I have checked
meticulously that the grid has columns that exactly correspond to the
columns in the dataset; no more and no fewer.

Any ideas chaps?

TIA

Charles



Jun 5 '06 #4

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

Similar topics

8
by: Don Wash | last post by:
Hi There! I'm using VB.NET to create a TreeView application and unfortunately I could not find "Key" property in Node items of the TreeView. We used to have "Key" property in TreeView node...
0
by: Ralf Gedrat | last post by:
Hello! I have a Application, this throws after some time following exception: Item has already been added. Key in dictionary: "- 1" key being added: "- 1" I use Application.Run with...
5
by: Charles Law | last post by:
This is driving me mad. Can someone please put me out of my misery? I have a DataSet which I wish to use as the data source for a grid control (it is actually an Infragistics grid). When I assign...
0
by: Ismail Fatih Yıldırım | last post by:
I modified the RSACSPSample from MSDN to try out a simple commutative encryption model using RSA encryption but when i run the progrem the first encryption command works but during the second...
0
by: active | last post by:
Sometimes when I After I click "Start Debugging" I get a "File not Found" Exception. Could not load file or assembly 'FormTesting, Version=1.0.2646.36738, Culture=neutral, PublicKeyToken=null'...
5
by: Sendil kumar | last post by:
Hi All, The FtpWebRequest.GetResponse( ) method is not giving "550 File not found exception " when I do a directory list operation on a invalid(not present) directory in HP Unix and Sun Solaris...
1
by: wbosw | last post by:
I created the following Sub to fill a DataSet with the Table named Developer. It binds to the Grid with no problems. Public Sub SearchSkills() Dim sqlcmd3 As SqlCommand = New...
0
by: Brian Lampe | last post by:
On Apr 11, 7:25 am, subhash <chend...@hotmail.comwrote: If your service is using a port other than 80, you can specify it in the service instantiation's Url property: ...
1
by: RN1 | last post by:
Sub Page_Load(........) If Not Page.IsPostBack Then Call LoadData() End If End Sub Sub LoadData() Dim dSet As DataSet Dim sqlConn As SqlConnection Dim sqlDapter As SqlDataAdapter
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.