02-20-2013 06:28 AM
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;
02-20-2013 07:33 AM - edited 02-20-2013 07:34 AM
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