FPSDK - How to display an Array in a Datagrid

Hello

I want to display all my array data in a datagrid.
I already tried with 'datagrid1.datasource = myarray but the result i get is the lenght of the array data.

Also my array needs to be multidimensional and when i make that change i get an error on flexpendant saying the array was not unidimensional.

Any Ideas ?
Thanks and Merry Christmas:stuck_out_tongue_winking_eye:

Hi Hydron,

I’m assuming this is a FlexPendant project then? (Hence the topic header change).

VB or C#?

What do you have in the array?

Care to give a code snippet of what happens before that?

Now there are some limits to Datagrids in Compact Framework so please make sure you have not just stumbled on a “refresh” issue, I know I have.
http://msdn.microsoft.com/en-us/library/ms172499(v=vs.80).aspx

Depending on how your array is arranged you might need to read this:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridtablestyle.mappingname(v=vs.71).aspx

Regarding multi dimensional - that is not a limit from the Compact Framework or FlexPendant, that is a limit of the Datagrid itself.
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagrid.aspx

[code]

To display a table in the System.Windows.Forms.DataGrid at run time, use the SetDataBinding method to set the DataSource and DataMember properties to a valid data source. The following data sources are valid:

For more information about the DataSet class, see DataSets, DataTables, and DataViews (ADO.NET).[/code]

I am using VB.
The array has integer variables.
The porpose is to display the numbers in the datagrid.

Hi Hydron,

are you using the RapidDataBindingSource object of FlexPendant SDK?
In the screenshot below you can see how I have bound a DataGrid to a RapidDataBindingSource which is listing one 2x2x2 num array and displaying its value in the “value” column. The entire value is displayed. (The grid was a bit to small so only the first elements of the array are visible)

My array looks like this:

VAR num numArray{2,2,2}:=[[[1,2],[1,2]],[[1,2],[1,2]]];

Is this what you want to do, or do you want to display the elements of a 2x2 array as rows and columns of the DataGrid?

(In that case I’m not sure how to do it, but before I’ll find out, I want to check with you).

Happy New Year!

Hi Niklas

No its more like you said it last, i want do display the elements of the array as rows and columns.

Happy New Year!!