Datagrid Form

Phil Davis revdev at pdslabs.net
Fri Jul 3 22:48:42 EDT 2015


Hi Pete,

Try commenting out all the code inside your 'LayoutControl' handler and 
see if that changes your outcomes. Using the code you posted here, I was 
able to build a DG and populate two rows, but I commented out the 
layoutControl code for the test.

Best -
Phil Davis


On 7/3/15 6:10 PM, Peter Haworth wrote:
> Hi Sri,
> Yes  I tried a refresh (from the Inspector palette for the datagrid),
> didn't make any difference.
>
> Here's my FillIInData code.
>
> on FillInData pDataArray
>
>     put pDataArray["Company Name"] into field "Company Name" of me
>     put pDataArray["Address"] into field "Address" of me
>     set the hilite of button "Customer" of me to pDataArray["Customer"]
>
> end FillInData
>
> As mentioned, pDataArray has the expected values in it's keys.
>
> Here's my LayoutControl code.  I didn't reposition any of the controls but
> left that one line in there since I wasn't sure if it was needed or not.
>
> on LayoutControl pControlRect
>
>     set the rect of graphic "Background" of me to pControlRect
> end LayoutControl
>
> Here's the code in my button to populate the datagrid.
>
> on mouseUp
>
>     local tData
>
>     put "lcSQL Software" into tData[1]["Company Name"]
>     put "PO Box 123" & return & "Soquel" & return & "CA 95073" & return &
> "USA" into tData[1]["Address"]
>     put true into tData[1]["Customer"]
>
>     put "Mollys Revenge" into tData[2]["Company Name"]
>     put "123 Some Street" & return & "Somewehere" & return & "OH 12345" &
> return & "USA" into tData[2]["Address"]
>     put false into tData[2]["Customer"]
>
>     set the dgData of group "dgForm" to tData
>
> end mouseUp
>
>
> I can't attach screen shots (?) but as mentioned before, at the start of
> the FIllInData handler, I see all the controls turn up in the datagrid so
> I'm taking that to mean my customization of the row template is correct.
> But I never see the data turn up as I step though each line in FillInData
> and the controls all disappear when the "end LayoutControl" command is
> executed.
>
> I should also say that even the dgData I send to the datagrid has two sets
> of data in it and I see FillInData called for both sets, I only ever see
> one set of controls before the datagrid is celared.
>
>
> On Fri, Jul 3, 2015 at 5:32 PM Sri <sritcp at gmail.com> wrote:
>
>> Hi Pete:
>>
>> I'd like to see the code (stripped down version).
>>
>> Also, did you try to manually refresh the datagrid and see (after stepping
>> over some code)?
>>
>> Regards,
>> Sri
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/Datagrid-Form-tp4693596p4693598.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

-- 
Phil Davis





More information about the use-livecode mailing list