Index
2008-09-21 17:26 – Paul McNary : [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 18:03 – Ed Leafe : Re: [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 18:07 – Ed Leafe : Re: [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 19:12 – Paul McNary : Re: [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 20:12 – Paul McNary : Re: [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 20:18 – Ed Leafe : Re: [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 22:37 – Paul McNary : Re: [dabo-users] Need help grid afterCellEdit(row, col)
2008-09-21 22:44 – Ed Leafe : Re: [dabo-users] Need help grid afterCellEdit(row, col)
Back to top
[dabo-users] Need help grid afterCellEdit(row, col)

Author: Paul McNary

Posted: 2008-09-21 17:26:45   Link

Hello

I need some help with afterCellEdit(row, col)

I would like to use it from an onKeyDown event

I need example code for it's use.

Thanks

Paul McNary

pmcnary@cameron.net

©2008 Paul McNary
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Ed Leafe

Posted: 2008-09-21 18:03:13   Link

On Sep 21, 2008, at 4:26 PM, Paul McNary wrote:

> I need some help with afterCellEdit(row, col)

>

> I would like to use it from an onKeyDown event

>

> I need example code for it's use.

afterCellEdit() is supposed to be called when an editor for a grid

cell is dismissed, but I just looked at the code, and I don't see

anywhere that it is called. Looks like a bug to me; I'll run some

tests and post an update if it turns out to be a bug.

As far as calling in from an KeyDown event handler, you'll have to

explain a bit more about what you need.

-- Ed Leafe

©2008 Ed Leafe
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Ed Leafe

Posted: 2008-09-21 18:07:31   Link

On Sep 21, 2008, at 5:03 PM, Ed Leafe wrote:

> afterCellEdit() is supposed to be called when an editor for a grid

> cell is dismissed, but I just looked at the code, and I don't see

> anywhere that it is called. Looks like a bug to me; I'll run some

> tests and post an update if it turns out to be a bug.

Spoke too soon: it is called from the wrapper for the wx-level

SetValue() method. So the grid's working fine in its current state.

-- Ed Leafe

©2008 Ed Leafe
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Paul McNary

Posted: 2008-09-21 19:12:54   Link

Ed Leafe wrote:

> On Sep 21, 2008, at 5:03 PM, Ed Leafe wrote:

>

>> afterCellEdit() is supposed to be called when an editor for a grid

>> cell is dismissed, but I just looked at the code, and I don't see

>> anywhere that it is called. Looks like a bug to me; I'll run some

>> tests and post an update if it turns out to be a bug.

>

>

> Spoke too soon: it is called from the wrapper for the wx-level

> SetValue() method. So the grid's working fine in its current state.

>

> -- Ed Leafe

>

From within a grid.

What I am needing to do is catch the TAB key event, which I am doing.

Then I want to setFocus to a textbox on the form.

I catch the TAB with onKeyDown, then I do the

self.Form.txtbxXX.setFocus()

When I'm done it is still in the grid.

I've tried evt.stop() in the onKeyDown but can't seem to

figure out how to get out of the grid

Thanks

Paul McNary

pmcnary@cameron.net

©2008 Paul McNary
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Paul McNary

Posted: 2008-09-21 20:12:21   Link

Paul McNary wrote:

> Ed Leafe wrote:

>> On Sep 21, 2008, at 5:03 PM, Ed Leafe wrote:

>>

>>> afterCellEdit() is supposed to be called when an editor for a grid

>>> cell is dismissed, but I just looked at the code, and I don't see

>>> anywhere that it is called. Looks like a bug to me; I'll run some

>>> tests and post an update if it turns out to be a bug.

>>

>>

>> Spoke too soon: it is called from the wrapper for the wx-level

>> SetValue() method. So the grid's working fine in its current state.

>>

>> -- Ed Leafe

>>

>

> From within a grid.

> What I am needing to do is catch the TAB key event, which I am doing.

> Then I want to setFocus to a textbox on the form.

>

> I catch the TAB with onKeyDown, then I do the

> self.Form.txtbxXX.setFocus()

> When I'm done it is still in the grid.

> I've tried evt.stop() in the onKeyDown but can't seem to

> figure out how to get out of the grid

>

> Thanks

>

> Paul McNary

> pmcnary@cameron.net

>

Further Clarification

def onGridCellSelected(self, evt):

if evt.EventObject.Columns[evt.col].DataField == "itemid":

print len(evt.EventObject.CurrentCellValue)

if len(evt.EventObject.CurrentCellValue) == 0:

print "You are not here"

self.Form.edtbxRecipeNotes.setFocus()

You are not here prints

When I am done I am still in the grid cell

Thanks

Paul McNary

pmcnary@cameron.net

©2008 Paul McNary
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Ed Leafe

Posted: 2008-09-21 20:18:15   Link

On Sep 21, 2008, at 6:12 PM, Paul McNary wrote:

> From within a grid.

> What I am needing to do is catch the TAB key event, which I am doing.

> Then I want to setFocus to a textbox on the form.

>

> I catch the TAB with onKeyDown, then I do the

> self.Form.txtbxXX.setFocus()

> When I'm done it is still in the grid.

> I've tried evt.stop() in the onKeyDown but can't seem to

> figure out how to get out of the grid

On my way out at the moment, so I can't test, but try this: in the

KeyDown event handler, try issuing:

evt.stop()

That should prevent the event from being passed to the wx layer.

-- Ed Leafe

©2008 Ed Leafe
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Paul McNary

Posted: 2008-09-21 22:37:44   Link

Ed Leafe wrote:

> On Sep 21, 2008, at 6:12 PM, Paul McNary wrote:

>

>> From within a grid.

>> What I am needing to do is catch the TAB key event, which I am doing.

>> Then I want to setFocus to a textbox on the form.

>>

>> I catch the TAB with onKeyDown, then I do the

>> self.Form.txtbxXX.setFocus()

>> When I'm done it is still in the grid.

>> I've tried evt.stop() in the onKeyDown but can't seem to

>> figure out how to get out of the grid

>

>

> On my way out at the moment, so I can't test, but try this: in the

> KeyDown event handler, try issuing:

>

> evt.stop()

>

> That should prevent the event from being passed to the wx layer.

>

> -- Ed Leafe

>

>

>

>

>

Hello

After evt.stop() and dabo.ui.callAfter() for the setFocus, I've pretty well got what I want.

Thanks

Paul McNary

pmcnary@cameron.net

©2008 Paul McNary
Back to top
Re: [dabo-users] Need help grid afterCellEdit(row, col)

Author: Ed Leafe

Posted: 2008-09-21 22:44:40   Link

On Sep 21, 2008, at 9:37 PM, Paul McNary wrote:

> After evt.stop() and dabo.ui.callAfter() for the setFocus, I've

> pretty well got what I want.

Cool! Glad it worked!

-- Ed Leafe

©2008 Ed Leafe