Strang problem with dataGrid - HELP !!!

G

Guest

Hi,

i have dataset and a dataGrid.
In the dataSet i have few tables and i run on each line, check if i need it,
and then copy it to the dataGrid (by using
dataGrid1[i,k]=dataSet[i,j].ToString(); )
sometimes is works just fine, and sometimes i get error message saying:
" The ListManager's position must be equal to rowNum
Parameter name: rowNum"

what does it mean?

Thanks,
Gidi.
 
I

Ignacio Machin \( .NET/ C# MVP \)

HI,

You better provide more details or even better the code.

What you mean with "I run on each line" ?

You better create a dataview with the data you want to display and then
using Data binding assign it to the datagrid
 
G

Guest

Gidi,
I cannot imagine how:
dataGrid1[i,k]=dataSet[i,j].ToString();
would ever work.
Your code example treats a DataSet as if it were a DataTable or a
multidimensional array, neither of which it is.

Suggestion: Follow Mr. Machin's advice.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top