Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Win32::GUI::Grid SetCellData setting and getting data problem

by kelchris (Novice)
on Jan 26, 2012 at 17:32 UTC ( #950177=perlquestion: print w/ replies, xml ) Need Help??
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

Comment on Win32::GUI::Grid SetCellData setting and getting data problem
Select or Download Code
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://950177]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-09-17 23:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (100 votes), past polls