LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetTableCellRangeVals with various data types

I try to update a table row of various data types with : 

SetTableCellRangeVals(panel,control,MakeRect(n,1,1,6),(void*)&RowData,VAL_ROW_MAJOR);

It fails in collumn 3 (the first string value) with data type missmatch.

 

How can I declare a data set that the function can handle ?

Currently it is declared as below:

 

struct
{
 int  ArticleNo,
      ArticleGroup;
 char SupName[100],
     Description[100],
    TypeCode[100];

double cost; 
}RowData;

0 Kudos
Message 1 of 2
(2,622 Views)

The SetTableCellRangeVals is intended to be used with arrays, not structs. Therefore, it is assumes that you are passing homogeneous data (all integers, all strings, etc...)

 

There is no function that you can use to set multiple cells from a struct. You have to set the values of one cell at a time, passing it the individual fields of you struct.

 

Luis

0 Kudos
Message 2 of 2
(2,616 Views)