1. EuGrid problem

Hello,

I have problem with function EGW_ScrollToCell.

In my application are 4 EuGrid tables with 9 columns. First one works fine and
this function too, but if I try to scroll to cell in other EuGrid table it
doesn't work. I've tried to trace this problem and there were other datas that I
expected.
The column_id of the required cell wasn't the same, which I've declared before 
"AcolNumber = EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
. 
. 
. 
"BcolNumber = EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
. 
. 
Column_id in first case is 1, but in second case is 10 instead of declared 1.
Loading data into all EuGrid tables by EGW_LoadData
works fine. It's a bug or normal...Or I do something wrong.

Help me please...

(EuGrid1.3.3)

Vlado

new topic     » topic index » view message » categorize

2. Re: EuGrid problem

Vlado Kusnirak wrote:
> 
> Hello,
> 
> I have problem with function EGW_ScrollToCell.
> 
> In my application are 4 EuGrid tables with 9 columns. First one works fine and
> this function too, but if I try to scroll to cell in other EuGrid table it
> doesn't
> work. I've tried to trace this problem and there were other datas that I
> expected.
> The column_id of the required cell wasn't the same, which I've declared before
> 
> "AcolNumber = EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
> . 
> . 
> . 
> "BcolNumber = EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
> . 
> . 
> Column_id in first case is 1, but in second case is 10 instead of declared 1.
> Loading data into all EuGrid tables by EGW_LoadData 
> works fine. It's a bug or normal...Or I do something wrong.
> 
> Help me please...
> 
> (EuGrid1.3.3)
> 
> Vlado

Column ids in EuGrid are sequential. So:
* first EuGrid has 9 columns withids 1-9
* second EuGrid has column ids 9+1 to 9+9
and so on
Any new column gets an incremented id; ids are not recycled.

HTH
CChris

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuGrid problem

CChris wrote:
> 
> Vlado Kusnirak wrote:
> > 
> > Hello,
> > 
> > I have problem with function EGW_ScrollToCell.
> > 
> > In my application are 4 EuGrid tables with 9 columns. First one works fine
> > and
> > this function too, but if I try to scroll to cell in other EuGrid table it
> > doesn't
> > work. I've tried to trace this problem and there were other datas that I
> > expected.
> > The column_id of the required cell wasn't the same, which I've declared
> > before
> > 
> > "AcolNumber = EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
> > . 
> > . 
> > . 
> > "BcolNumber = EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
> > . 
> > . 
> > Column_id in first case is 1, but in second case is 10 instead of declared
> > 1.
> > Loading data into all EuGrid tables by EGW_LoadData 
> > works fine. It's a bug or normal...Or I do something wrong.
> > 
> > Help me please...
> > 
> > (EuGrid1.3.3)
> > 
> > Vlado
> 
> Column ids in EuGrid are sequential. So:
> * first EuGrid has 9 columns withids 1-9
> * second EuGrid has column ids 9+1 to 9+9
> and so on
> Any new column gets an incremented id; ids are not recycled.
> 
> HTH
> CChris

void = EGW_ScrollToCell ( EuGrid1, 2,3 ) -- row = 2, column =3
void = EGW_ScrollToCell ( EuGrid2, 2,3 ) -- row = 2, column =3


-- doesn't work
void = EGW_ScrollToCell ( EuGrid1, 2,2 ) -- row = 2, column =3
void = EGW_ScrollToCell ( EuGrid2, 2,3+9 ) -- row = 2, column =3

-- works

It means that I have to count it manualy ?

Vlado

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuGrid problem

Vlado Kusnirak wrote:
> 
> CChris wrote:
> > 
> > Vlado Kusnirak wrote:
> > > 
> > > Hello,
> > > 
> > > I have problem with function EGW_ScrollToCell.
> > > 
> > > In my application are 4 EuGrid tables with 9 columns. First one works fine
> > > and
> > > this function too, but if I try to scroll to cell in other EuGrid table it
> > > doesn't
> > > work. I've tried to trace this problem and there were other datas that I
> > > expected.
> > > The column_id of the required cell wasn't the same, which I've declared
> > > before
> > > 
> > > "AcolNumber = EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
> > > . 
> > > . 
> > > . 
> > > "BcolNumber = EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )"
> > > . 
> > > . 
> > > Column_id in first case is 1, but in second case is 10 instead of declared
> > > 1.
> > > Loading data into all EuGrid tables by EGW_LoadData 
> > > works fine. It's a bug or normal...Or I do something wrong.
> > > 
> > > Help me please...
> > > 
> > > (EuGrid1.3.3)
> > > 
> > > Vlado
> > 
> > Column ids in EuGrid are sequential. So:
> > * first EuGrid has 9 columns withids 1-9
> > * second EuGrid has column ids 9+1 to 9+9
> > and so on
> > Any new column gets an incremented id; ids are not recycled.
> > 
> > HTH
> > CChris
> 
> }}}
<eucode>
> void = EGW_ScrollToCell ( EuGrid1, 2,3 ) -- row = 2, column =3
> void = EGW_ScrollToCell ( EuGrid2, 2,3 ) -- row = 2, column =3
> </eucode>
{{{

> 
> -- doesn't work
> }}}
<eucode>
> void = EGW_ScrollToCell ( EuGrid1, 2,2 ) -- row = 2, column =3
> void = EGW_ScrollToCell ( EuGrid2, 2,3+9 ) -- row = 2, column =3
> </eucode>
{{{

> -- works
> 
> It means that I have to count it manualy ?
> 
> Vlado

Hi Vlado,

You should do it like this:

AcolNumber = EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )
BcolNumber = EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )

void = EGW_ScrollToCell ( EuGrid1, 2, AcolNumber )
void = EGW_ScrollToCell ( EuGrid2, 2, BcolNumber )

i.e. don't assume the column id == column position.

HTH,

Phil

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuGrid problem

Adding to this approach, you can store the columns in a sequence to access them
like if you were using the column number.
IE:
sequence Grid1, Grid2
Grid1 = {}
Grid2 = {}
Grid1 = Grid1 & EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )
Grid2 = Grid2 & EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )

void = EGW_ScrollToCell ( EuGrid1, 2, Grid1[1] )
void = EGW_ScrollToCell ( EuGrid2, 2, Grid2[1] )


Phil Russell wrote:
> 
> Hi Vlado,
> 
> You should do it like this:
> 
> AcolNumber = EGW_AddColumn( EuGrid1, "#", 40, EGW_LAST, EGW_EDIT, 1 )
> BcolNumber = EGW_AddColumn( EuGrid2, "#", 40, EGW_LAST, EGW_EDIT, 1 )
> 
> void = EGW_ScrollToCell ( EuGrid1, 2, AcolNumber )
> void = EGW_ScrollToCell ( EuGrid2, 2, BcolNumber )
> 
> i.e. don't assume the column id == column position.
> 
> HTH,
> 
> Phil

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu