You can either use BINDEVENT() to add code to your form and dynamically
bind it to your checkbox, or you define all your columns in your form's
grid.

To put a Checkbox in the grid:

1) select the colulmn in the form designer
    right click./edit in the grid and make sure the property sheet is the
column you want.
2) select your checkbox or custom checkbox class from the toolbar
3) click back on the columns in the grid

You should now have both a textbox and a checkbox in the grid column.

To remove the textbox:

1) select the textbox in the column on the property sheet
2) click on the form designer titlebar (not in the form  you're working on)
3) press delete button

You should now have only the checkbox in your column.

Fred


On Wed, Aug 22, 2012 at 12:44 PM, Michael Savage <[email protected]> wrote:

> I know how to add a checkbox to a column in a grid in code. However I do
> not know if I can write code to the valid event to put my validation
> code in it. I thought there was a way to drag and drop a checkbox in a
> column in the development envirnment.
>
> Is this correct? If so how to do it?
>
> Mike
> On 22/08/2012 12:13 PM, Fred Taylor wrote:
> > If you need to do things based on the value after you've moved the row
> and
> > changed with the click, then the place would be in the Valid of the
> > checkbox.  All references would be to the table values there, which would
> > be on the correct row.
> >
> > Fred
> >
> >
> > On Wed, Aug 22, 2012 at 5:03 AM, Michael Savage <[email protected]>
> wrote:
> >
> >> That is exactly what is happening.. If the before value... issue you
> >> mention. Where should I put my validation code, so that when I click on
> >> the check box column, it goes to the right row.
> >> TIA,
> >> Mike
> >> On 22/08/2012 12:21 AM, Fred Taylor wrote:
> >>> Its really got to be some other code somewhere.  I just whipped up a
> >> simple
> >>> for with a grid with a checkbox.  Works as expected.
> >>>
> >>> Put a WAIT WINDOW as the first line of code in the AfterRowColChange
> >> event
> >>> so you can see what the value of the field is.  The value should be
> >> what's
> >>> in the cursor/table of the row you've clicked into.  Be aware that if
> >>> you're clicking in the column with the checkbox, the value will be what
> >> the
> >>> value was BEFORE you clicked on the row.  Clicking in the column
> changed
> >>> the value after the AfterRowColChange event fired.
> >>>
> >>> Fred
> >>>
> >>>
> >>> On Tue, Aug 21, 2012 at 8:59 PM, Fred Taylor <[email protected]>
> wrote:
> >>>
> >>>> Do you have any code in any of the text boxes, headers, columns, grid
> >>>> events/methods?  That may be causing strangeness in the normal flow of
> >> the
> >>>> events.
> >>>>
> >>>> Wait a minute, you said toolbar.  That can also impact the flow of
> >> events.
> >>>> Fred
> >>>>
> >>>>
> >>>>
> >>>> On Tue, Aug 21, 2012 at 8:16 PM, Michael Savage <[email protected]
> >>> wrote:
> >>>>> I thought that, but that does not seem to be happening...
> >>>>> My first column is a logical with a check box in it. After I pick
> edit
> >>>>> from my toolbar on my form, I then proceed to go to the grid. Let
> say I
> >>>>> move the mouse to row 7.
> >>>>> When I click on row 7, the After... fires, before row seven gets the
> >>>>> focus.
> >>>>>
> >>>>> Any ideas of what I am doing wrong?
> >>>>>
> >>>>> TIA,
> >>>>> Mike
> >>>>> On 21/08/2012 7:44 PM, Fred Taylor wrote:
> >>>>>> You should already be on the correct record from the RecordSource of
> >> the
> >>>>>> grid.  You should be referencing the table/cursor field, not the
> >>>>>> Column.Text1.Value.
> >>>>>>
> >>>>>> Fred
> >>>>>>
> >>>>>>
> >>>>>> On Tue, Aug 21, 2012 at 4:39 PM, Michael Savage <[email protected]
> >
> >>>>> wrote:
> >>>>>>> I have some code in a grid's AfterRowColChange method to call a
> >> method
> >>>>>>> on the form for some on the spot validation.
> >>>>>>>
> >>>>>>> When I activate the grid for editing, it is normally at the top.
> >>>>>>> I pick the row I want, and prior to moving, it runs the code in the
> >>>>>>> AfterRowColChange.
> >>>>>>> How do I get the validation to occur after I have focus in the new
> >> row?
> >>>>>>> I'm very confused.
> >>>>>>>
> >>>>>>> TIA,
> >>>>>>> Mike
> >>>>>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJCBksqd1ODUFwO4R680SW3C+7Bq9o=wrhuwbzf5gik+x+0...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to