FPSDK - How to display an Array in a Datagrid
Hello
John Wiberg2011-12-22 14:06:07
Comments
-
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).aspxDepending 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).aspxRegarding 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:
A DataView
A DataSet
A single dimension array
Any component that implements the IListSource interface
Any component that implements the IList interface
For more information about the DataSet class, see DataSets, DataTables, and DataViews (ADO.NET).[/code]
John
Developer Center0 -
I am using VB.The array has integer variables.The porpose is to display the numbers in the datagrid.0
-
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:[CODE]VAR num numArray{2,2,2}:=[[[1,2],[1,2]],[[1,2],[1,2]]];[/CODE]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!
Niklas Skoglund2011-12-30 23:00:240 -
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!!0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings