LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with SetTableCellRangeAttribute

I have a table control in CVI that can have up to 3000 rows.

Row 1 will always be text, and row 2 will always be float.

When I use SetTableCellRangeAttribute to set row 1 to accept a string, I get a protection fault.

But it only happens when I have more then 2390 rows.
When I have 2390 rows or less it works perfectly.

this is my code


SetTableCellRangeAttribute (pnlMain, PANEL_MEAS_TABLE,
MakeRect (1, 1, theMicroplate->NumberSamples, 1), ATTR_CELL_TYPE,
VAL_CELL_STRING);


Now the problem is definately not in theMicroplate->NumberSamples, because I have debugged it and also just replaced it with numbers to verify there were no problems.

The fault is tied to the number of rows specified.
Any
ideas?
0 Kudos
Message 1 of 2
(2,643 Views)
I tried creating 3000 rows, first defined as numerics, and I then converted one row to type string as follows:

for(i=0;i<3000;i++)
{
InsertTableRows (panelHandle, PANEL_TABLE, -1, 1, VAL_CELL_NUMERIC);
}

SetTableCellRangeAttribute (panelHandle, PANEL_TABLE, VAL_TABLE_ROW_RANGE(5), ATTR_CELL_TYPE, VAL_CELL_STRING);

Make sure you use the VAL_TABLE_ROW_RANGE macro when selecting a range in the SetTableCellRangeAttribute () function.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,643 Views)