row or col change ??? 
Author Message
 row or col change ???

Is there an easy way of knowing in the beforerowcolchange method of a grid
if it's a row change or a column change ???

TIA,

Marie

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.*-*-*.com/ - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???
You can create your own.

Just add a property nRow to the grid
then in the afterrowcolchange use this:
If this.ActiveRow # this.nRow
    this.nRow = recno(this.activeRow)
    && RowChange
Else
    && Colchange
Endif
I myself has made a method to the form called something like Rowchange and i
call that using the code above

Greetings,

Ko Wisse



Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???
Thanks...  it works.

I've come to another problem... I want to prevent the change of row in a
grid, that's why my first question...  But when I add 'nodefault' in the
beforerowcolchange, I cannot, after that, make the 'dodefault()', have any
idea ???



Quote:
> You can create your own.

> Just add a property nRow to the grid
> then in the afterrowcolchange use this:
> If this.ActiveRow # this.nRow
>     this.nRow = recno(this.activeRow)
>     && RowChange
> Else
>     && Colchange
> Endif
> I myself has made a method to the form called something like Rowchange and
i
> call that using the code above

> Greetings,

> Ko Wisse

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???
Forget the nodefault and dodefault for the BeforeRowColChange method on
a grid.  In the same way that you detect row changes you can store the
record pointer and GOTO nRecno when the user has changed rows.

- Keith



Quote:
> Thanks...  it works.

> I've come to another problem... I want to prevent the change of row
in a
> grid, that's why my first question...  But when I add 'nodefault' in
the
> beforerowcolchange, I cannot, after that, make the 'dodefault()',
have any
> idea ???



> > You can create your own.

> > Just add a property nRow to the grid
> > then in the afterrowcolchange use this:
> > If this.ActiveRow # this.nRow
> >     this.nRow = recno(this.activeRow)
> >     && RowChange
> > Else
> >     && Colchange
> > Endif
> > I myself has made a method to the form called something like
Rowchange and
> i
> > call that using the code above

> > Greetings,

> > Ko Wisse

> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???
Forget about that, my mistake...



Quote:
> Thanks...  it works.

> I've come to another problem... I want to prevent the change of row in a
> grid, that's why my first question...  But when I add 'nodefault' in the
> beforerowcolchange, I cannot, after that, make the 'dodefault()', have any
> idea ???



> > You can create your own.

> > Just add a property nRow to the grid
> > then in the afterrowcolchange use this:
> > If this.ActiveRow # this.nRow
> >     this.nRow = recno(this.activeRow)
> >     && RowChange
> > Else
> >     && Colchange
> > Endif
> > I myself has made a method to the form called something like Rowchange
and
> i
> > call that using the code above

> > Greetings,

> > Ko Wisse

> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???

Quote:
> I've come to another problem... I want to prevent the change of row in a
> grid, that's why my first question...  But when I add 'nodefault' in the
> beforerowcolchange, I cannot, after that, make the 'dodefault()', have any
> idea ???

I think thats a bit more difficult.
In the beforerowcolchange you still don't have any idea what will happen.
Only in the afterrowcolchange when it is too late.
But you can try to use activatecell(this.nRow,1) in the afterrowcolchange if
you have determined not to go to this row.

Greetings,

Ko Wisse



Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???
ActivateCell will not work in this example.  The key to controlling the
active row on a grid is controlling the record pointer.

- Keith



Quote:
> > I've come to another problem... I want to prevent the change of row
in a
> > grid, that's why my first question...  But when I add 'nodefault'
in the
> > beforerowcolchange, I cannot, after that, make the 'dodefault()',
have any
> > idea ???

> I think thats a bit more difficult.
> In the beforerowcolchange you still don't have any idea what will
happen.
> Only in the afterrowcolchange when it is too late.
> But you can try to use activatecell(this.nRow,1) in the

afterrowcolchange if

Quote:
> you have determined not to go to this row.

> Greetings,

> Ko Wisse

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 09 Mar 2003 03:00:00 GMT  
 row or col change ???

The problem with this is that the code below happens AFTER the change has
occurred. The original post asked if there was a way to know if the change
is a row or column before the change has happened, possibly to perform some
type of validation.

I've seen this question raised many times and have fought it myself many
times, the result is that there is no way to know beforehand if the row or
column is changing.

--
William Fields
MCSD - Microsoft Visual FoxPro
US Bankruptcy Court
Phoenix, AZ

"While the Complexity of this Project is
several orders of magnitude less than
modeling heat flux in a fossil-fuel fired
electric utility plant using the Hottel Zone
technique, the context of each project
evolves in a remarkably similar fashion."
- Author Unknown


Quote:
> You can create your own.

> Just add a property nRow to the grid
> then in the afterrowcolchange use this:
> If this.ActiveRow # this.nRow
>     this.nRow = recno(this.activeRow)
>     && RowChange
> Else
>     && Colchange
> Endif
> I myself has made a method to the form called something like Rowchange and
i
> call that using the code above

> Greetings,

> Ko Wisse



Sun, 09 Mar 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Print using @Row, Col

2. Problem in printing using @ Row, Col

3. Active row in a grid when changing index order

4. How to change BackColor of a Grid ROW???

5. Found a reliable way to detect row change in grid

6. Detecting Row Changes in a Grid

7. How to determine Row Change in Grid

8. GRID: trap row change/ignore column

9. Changing row in grid

10. change only active row value

11. Row Change Detection

12. Grid Dyanmic row changing color ...

 

 
Powered by phpBB® Forum Software