I have the following child window initialization code.
my $Child = $Window->{Client}->AddMDIChild (
-name => "Child".$ChildCount++,
-title => $title,
-onResize => \&ChildSize,
) or die "Child";
$Child->AddGrid (
-name => "Grid",
-pos => [0, 0],
-rows => 50,
-columns => 10,
-fixedrows => 1,
-fixedcolumns => 1,
-editable => 1,
) or die "new Grid";
Now I want to be able to write some information to a database when a cell is edited in my grid control.
sub Grid_EndEdit {
my ($row, $col) = @_;
my $string=$Grid->GetCellText($row, $col);
my $changeid=$Grid->GetCellText($row, 1);
my $changeattribute=$Grid->GetCellText(0, $col);
$dbh->do("UPDATE INV SET $changeattribute = ? WHERE CODE = ?" , un
+def, $string, $changeid);
}
I cant use the previous function because I don't know the handle to the childwindow. Is there a way for me to determine this without passing the handle myself. Which I can't do anyway since _EndEdit is a function of WIN32::GUI::Grid.pm.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.