Looks like I can post again. I had sent this note in response to a question. I resend in case the code adds further information.
---------- Forwarded Message ---------- Subject: Re: [Hk-classes-discuss] masterform - subform Date: Friday 10 August 2007 17:33 From: Jesus Arocho <[EMAIL PROTECTED]> To: discussing hk_classes & knoda <[email protected]> Hope this helps: #in this example gridstudent is one of two grids on the main form. I use the value of one column in gridstudent to change the query in the second grid: gridtblstudact. #get current value of grade for student and subject value from grid colstudent=hk_thisform.get_pyvisible("gridstudent").datasource().column_by_na me("studentid") colstudentvalue=colstudent.asinteger() + 100000 #now we can reset the grid datasource gridtbl=hk_thisform.get_pyvisible("gridtblstudact") #qrytblstudent = "select * from table '" + str(colstudentvalue) + "'" #hk_this.show_warningmessage(tblstudent) gridtbl.datasource().disable() gridtbl.datasource().set_name(str(colstudentvalue)) gridtbl.datasource().enable() On Friday 10 August 2007 16:26, Egbert Eissing wrote: > The documentation discribes a function > masterform() with the explanation "If this is a subform > it will return masterform it belongs to". > > I have experimented with this function trying approaches as follows: > MasterForm=hk_this.masterform() > Path=MasterForm.get_pyvisible("Path") > Unfortunately, the function masterform() does not seem to be recognised, it > always returns an error. Is my syntax wrong? How is this function to be > used to obtain the expected result? > > I also need to know how I can read data items from a subform grid field if > I click a button on the main form. > > Any good idea anyone? > Egbert > > > > --------------------------------- > Yahoo! Answers - Get better answers from someone who knows. Tryit now. ------------------------------------------------------- ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Hk-classes-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss
