Subject RE: [IBO] F2 to Edit
Author Alan McDonald
> Alan McDonald wrote:
> > I have one grid working the way I want. Users have to use F2
> > to start editing a cell.
> > IB_Query.RequestLive=True
> > DataSource.AutoEdit=False
> > IB_Grid.gnF2Edits=True
> > IB_Grid.gnF2ToggleEditor=True
> > IB_Grid.PreventEditing=False
> > I THINK this is all that does it... but I can't make another
> > grid behave the same way. All query and grid properties
> > appear to be identical but in this second grid (depending on
> > how the above properties are set) I get either no response
> > from F2 at all to start editing OR I can overtype cell
> > contents with no protection.
> > Anyone know what other property I need to set to make F2 the
> > gateway to editing?
>
> I always had a lot of trouble with getting grid editing to work
> consistently unless I made sure every column had a dropped
> editor control (to replace the InplaceEditor used by IB_Grid).
> Could the difference in your grids be that one has specific
> controls while the other relies on InplaceEditor?
>
> The difference between dropped-in edit controls and the
> InplaceEditor was always a frustration when I tried to
> implement this feature.
>
> I dont know if you contemplated using IB_Grid.gnF2Posts, but
> in that case there are particular problems with InplaceEditor.
> From the help for NavigateOptions:
> "You will probably NOT want to use gnF2Posts if any column uses
> the standard grid InplaceEdit control (ie. only this use when
> all columns have a special dropped in edit control). This is
> because you will need the F2 key to enable edit of the
> InplaceEdit even when AlwaysShowEditor is true."
>
> And related to the above, keep in mind that:
> IB_Grid.gnF2ToggleEditor=True
> toggles AlwaysShowEditor so that tabbing to the next cell will
> (or should) stay in edit mode. If you wanted cell-by-cell
> operation (like a spreadsheet) then you probably want this off
> (and AlwaysShowEditor=False).
>
> HTH
>
> --
> Geoff Worboys
thanks - but it appears my settings are as I need them if I just add a popup
menu F2 shortcut to the grid which just sets IB_Query.Edit;
then all is as I need
Alan