470,833 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

"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 2434
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by RN1 | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.