473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DisplayNested Structure Array in DataGridView

VS 2005 SP1. Googled without success.

I have an array of structs, and some of the elements are arrays of structs.
E.g.,
-------------------------------------
public struct foobar {
public int ID;
public string Name;
public foo[] FooFields;
public bar[] BarFields;
}

public struct foo {
public int LengthMin;
public int LengthMax;
public string Name;
public byte[] ByteRay;
}

public struct bar {
public int ErrNum;
public string ErrName;
public string ErrDescription;
}

private foobar[] FooBarRay;
-------------------------------------

I'm trying to display the array in a DataGridView. I can get the data into
the DataGridView, I just can't figure out how to make it show up. This code
gets the data into dataGridView1

dataGridView1.AutoGenerateColumns = true;
dataGridView1.DataSource = FooBarRay;

but nothing is displayed.

What's a good way to display hierarchical structs like these? Am I missing
something about DataGridView? Is there a better control? Are there tools
for making the wrapper classes? Is there a way to load this array into some
part of ADO.NET and display? My googling on these topics didn't find
anything helpful, so far.

Thanks.

-- Mark
Mar 1 '07 #1
0 1405

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

Similar topics

1
by: Steve | last post by:
I have a string arrary that i wish to display in a datagridview but when i set the datasource to the array the resulting datagridview gives me the length of the stings not the actual strings. How...
0
by: MikeCS | last post by:
Hi all I would like some help with this issue. I am new to VB 2005 (OK with VB6) My problem is that I cannot seem to return a structure from a function. Example: I defined a structure in a...
0
by: freddycoal | last post by:
Hi, I would like know, how transform a datagridview row to an array. Exist commands for make this?. I have CVS file, I read line to line, but I would like asign this array (one line in my...
2
by: psmith811 | last post by:
XP, VB.net 2005 I'm trying to output some data that is currently in a large structure array. I'm stuck trying to figure out how to get a DataTable filled with this structure data, and that's if...
1
by: jcasti1226 | last post by:
Hi guys, This may be a dumb but it has given me a lot of problems. Here is my situation:
1
by: pbrown | last post by:
So I've got an array of string values which I'd like to display in an unbound DataGridView. What is the process necessary to simply load strings into cells of a datagrid? Ideally, we would go...
9
by: Miro | last post by:
My current headache is proper is with the datagridview I am starting to realize that a DataGridView within vs2008 is not as 'robust' as a 'textboxfield' by default for example. Example: A...
0
by: bharathi228 | last post by:
hi, how to assign a array as datasource to datagridview in vb.net. my code is Dim intarray(mblndigital_inputs) As Integer mblndigital_inputs.Copyto(intarray, 0) Array.Reverse(intarray)
3
by: bharathi228 | last post by:
hi, how to assign a array as datasource to datagridview in vb.net. my problem is iam having an array with 60 values
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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
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...

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.