kelchris has asked for the wisdom of the Perl Monks concerning the following question:

Hey there,

I really can't get SetCellData and GetCellData to work properly.

my $sku = "BR123123"; $grid->SetCellData(1,1,$sku);
But:
SetCellData (nRow, nCol, lParam) from http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=grid

So how do I convert $sku to lParam? And how can I convert that lParam I get from GetCellData to the actual data I set?

I have tried converting sku:
$sku = unpack("L", pack('p', $sku));
then:
$table->SetCellData(1,1,$sku);

But $table->GetCellData(1,1) isn't returning my $sku value

The reason I am using SetCellData is to trace where the rows move after sorting

Any help would be appreciated, thanks!

Thanks

Replies are listed 'Best First'.
Re: Win32::GUI::Grid SetCellData setting and getting data problem
by kelchris (Novice) on Jan 26, 2012 at 18:36 UTC
    Just found out that setting $table->SetCellData(1,1,$sku); on another block would cause the $sku to disappear for some reason.

    Setting $sku to a temporary global variable and using that variable in $table->SetCellData(1,1,$globalVar) did the trick.