SetCellValue from a GetCellValue from a different grid

Hi,
Still learning.
So initially I have frame that has a grid with five columns, and a
single row initially, for the user to insert something of relation to
the column labels. I've bind the first column to a
EVT_GRID_CELL_LEFT_CLICK so that a MiniFrame shows up having another
grid with three columns, so the user could choose what could be
inserted to the first column on the Frame, among the three columns of
the grid on the MiniFrame, I only wish to have the value on the cell
selected only on the first column among the three. So I bind only the
first column of the grid on the MiniFrame to
EVT_GRID_CELL_LEFT_DCLICK, once double-clicked the selection shows on
the first column of the grid on the frame. So my question is how to
"redirect" (I don't know if that's the term used) the value from the
grid of the MiniFrame to the grid of the parent frame.

Frame - wx.grid.Grid
MiniFrame - wx.grid.PyGridTableBase(data from a database)

Here's what I thought of:
    # method for the grid on the MiniFrame
    def OnCellDLClick(self, evt):
        if evt.GetCol() == 0:
            sltd = coa.GetCellValue(evt.GetPosition) # coa is the
grid instance
            je.SetCellValue(sltd) # je is the grid instance for the
Frame from another class
        evt.Skip()

That didn't quite work at all, I do know I'm lacking a parameter for
the je.SetCellValue, there should cell coordinates. And also the rows
on the Frame increments, to be stored on a database.
So what am I doing wrong?
Your helps are highly appreciated

Maybe have both tables 'share' a underlying PyGridTableBase?

Are you using CreateGrid() or SetTable()?

···

On Sep 8, 10:20 am, karentinedo <kareen.tin...@gmail.com> wrote:

Hi,
Still learning.
So initially I have frame that has a grid with five columns, and a
single row initially, for the user to insert something of relation to
the column labels. I've bind the first column to a
EVT_GRID_CELL_LEFT_CLICK so that a MiniFrame shows up having another
grid with three columns, so the user could choose what could be
inserted to the first column on the Frame, among the three columns of
the grid on the MiniFrame, I only wish to have the value on the cell
selected only on the first column among the three. So I bind only the
first column of the grid on the MiniFrame to
EVT_GRID_CELL_LEFT_DCLICK, once double-clicked the selection shows on
the first column of the grid on the frame. So my question is how to
"redirect" (I don't know if that's the term used) the value from the
grid of the MiniFrame to the grid of the parent frame.

Frame - wx.grid.Grid
MiniFrame - wx.grid.PyGridTableBase(data from a database)

Here's what I thought of:
# method for the grid on the MiniFrame
def OnCellDLClick(self, evt):
if evt.GetCol() == 0:
sltd = coa.GetCellValue(evt.GetPosition) # coa is the
grid instance
je.SetCellValue(sltd) # je is the grid instance for the
Frame from another class
evt.Skip()

That didn't quite work at all, I do know I'm lacking a parameter for
the je.SetCellValue, there should cell coordinates. And also the rows
on the Frame increments, to be stored on a database.
So what am I doing wrong?
Your helps are highly appreciated

SetTable() for both grids

···

On Sep 18, 6:42 am, siris <siris...@gmail.com> wrote:

Maybe have both tables 'share' a underlying PyGridTableBase?

Are you using CreateGrid() or SetTable()?

On Sep 8, 10:20 am, karentinedo <kareen.tin...@gmail.com> wrote:

> Hi,
> Still learning.
> So initially I have frame that has agridwith five columns, and a
> single row initially, for the user to insert something of relation to
> the column labels. I've bind the first column to a
> EVT_GRID_CELL_LEFT_CLICK so that a MiniFrame shows up having another
>gridwith three columns, so the user could choose what could be
> inserted to the first column on the Frame, among the three columns of
> thegridon the MiniFrame, I only wish to have the value on the cell
> selected only on the first column among the three. So I bind only the
> first column of thegridon the MiniFrame to
> EVT_GRID_CELL_LEFT_DCLICK, once double-clicked the selection shows on
> the first column of thegridon the frame. So my question is how to
> "redirect" (I don't know if that's the term used) the value from the
>gridof the MiniFrame to thegridof the parent frame.

> Frame - wx.grid.Grid
> MiniFrame - wx.grid.PyGridTableBase(data from adatabase)

> Here's what I thought of:
> # method for thegridon the MiniFrame
> def OnCellDLClick(self, evt):
> if evt.GetCol() == 0:
> sltd = coa.GetCellValue(evt.GetPosition) # coa is the
>gridinstance
> je.SetCellValue(sltd) # je is thegridinstance for the
> Frame from another class
> evt.Skip()

> That didn't quite work at all, I do know I'm lacking a parameter for
> the je.SetCellValue, there should cell coordinates. And also the rows
> on the Frame increments, to be stored on adatabase.
> So what am I doing wrong?
> Your helps are highly appreciated

maybe this could work.

table1.data[(some,cell)] = table2.data[(same,cell)]

I’m not at my dev box right now, but I will try this when I get there.

···

On Fri, Sep 30, 2011 at 8:40 AM, karentinedo kareen.tinedo@gmail.com wrote:

SetTable() for both grids

On Sep 18, 6:42 am, siris siris...@gmail.com wrote:

Maybe have both tables ‘share’ a underlying PyGridTableBase?

Are you using CreateGrid() or SetTable()?

On Sep 8, 10:20 am, karentinedo kareen.tin...@gmail.com wrote:

Hi,

Still learning.

So initially I have frame that has agridwith five columns, and a
single row initially, for the user to insert something of relation to

the column labels. I’ve bind the first column to a

EVT_GRID_CELL_LEFT_CLICK so that a MiniFrame shows up having another

gridwith three columns, so the user could choose what could be
inserted to the first column on the Frame, among the three columns of

thegridon the MiniFrame, I only wish to have the value on the cell
selected only on the first column among the three. So I bind only the

first column of thegridon the MiniFrame to
EVT_GRID_CELL_LEFT_DCLICK, once double-clicked the selection shows on

the first column of thegridon the frame. So my question is how to
“redirect” (I don’t know if that’s the term used) the value from the

gridof the MiniFrame to thegridof the parent frame.

Frame - wx.grid.Grid

MiniFrame - wx.grid.PyGridTableBase(data from adatabase)

Here’s what I thought of:

# method for thegridon the MiniFrame
def OnCellDLClick(self, evt):
    if evt.GetCol() == 0:
        sltd = coa.GetCellValue(evt.GetPosition)  # coa is the

gridinstance

        je.SetCellValue(sltd)  # je is thegridinstance for the

Frame from another class

    evt.Skip()

That didn’t quite work at all, I do know I’m lacking a parameter for

the je.SetCellValue, there should cell coordinates. And also the rows

on the Frame increments, to be stored on adatabase.

So what am I doing wrong?

Your helps are highly appreciated

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en


godspeed you black cats