Datagrid Form

Peter Haworth pete at lcsql.com
Sat Jul 4 12:26:10 EDT 2015


Cache controls is off and I'm not refreshing the datagrid anywhere in my
code.

On Fri, Jul 3, 2015 at 7:31 PM Mike Bonner <bonnmike at gmail.com> wrote:

> Silly question, but do you have the "cache controls" box checked in the
> inspector for the datagrid?  If you uncheck it, and click the refresh
> datagrid button, does the data show up?
>
> If so, is there anywhere that you are manually telling the datagrid to
> refresh in your code after the dg is populated?
>
> Strangely, if Ihave "fixed control height" unchecked, and "cache controls"
> checked, and refresh the datagrid, the datagrid will suddenly appear empty.
>  checking fixed control height, or unchecking cache controls, will make it
> show back up. (7.0.5)  But if I populate it using the button, it doesn't
> seem to matter what is checked and what isn't, right up until a refresh is
> done, hence the question about doing a refresh in your code somewhere.
>
> On Fri, Jul 3, 2015 at 7:10 PM, Peter Haworth <pete at lcsql.com> 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
> >
> _______________________________________________
> 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
>



More information about the use-livecode mailing list