PDA

View Full Version : Grid clear



Bob Worsley
30-Jun-2007, 02:42 PM
I found the AutoClearDeoState property and have successfully used it but
have noticed that it apparently doesn't extend to any grids used in the same
program. If for example you add a line to a grid and click the save button,
the grid line will clear. It's kind of important to have the non-clear
functionality in the grid too, since on occasion I need to auto-save a line
and go on with what's happening. Or did I miss something?
Bob

Bob Worsley
30-Jun-2007, 04:46 PM
One point of clarification on this... the behavior only seems to happen when
adding a new record. In fact the grid seems to behave rather strangely in
that the row clears and some of the other records disappear -- it's
obviously resorting itself. I'd expect the row to remain along with all
that were previously on the screen... but of course this isn't Windows.
Making a change to an existing row works as expected.

Oh, and the arrow keys don't work in a grid, is that by design or an
oversight?

Bob

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:OH55L60uHHA.5828@dacmail.dataaccess.com...
> I found the AutoClearDeoState property and have successfully used it but
> have noticed that it apparently doesn't extend to any grids used in the
same
> program. If for example you add a line to a grid and click the save
button,
> the grid line will clear. It's kind of important to have the non-clear
> functionality in the grid too, since on occasion I need to auto-save a
line
> and go on with what's happening. Or did I miss something?
> Bob
>
>
>
>

Bob Worsley
30-Jun-2007, 06:49 PM
Scratch the arrow key complaint, not sure why they didn't work that time,
they do.
Bob

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:$q9pv$1uHHA.5736@dacmail.dataaccess.com...
> One point of clarification on this... the behavior only seems to happen
when
> adding a new record. In fact the grid seems to behave rather strangely in
> that the row clears and some of the other records disappear -- it's
> obviously resorting itself. I'd expect the row to remain along with all
> that were previously on the screen... but of course this isn't Windows.
> Making a change to an existing row works as expected.
>
> Oh, and the arrow keys don't work in a grid, is that by design or an
> oversight?
>
> Bob
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:OH55L60uHHA.5828@dacmail.dataaccess.com...
> > I found the AutoClearDeoState property and have successfully used it but
> > have noticed that it apparently doesn't extend to any grids used in the
> same
> > program. If for example you add a line to a grid and click the save
> button,
> > the grid line will clear. It's kind of important to have the non-clear
> > functionality in the grid too, since on occasion I need to auto-save a
> line
> > and go on with what's happening. Or did I miss something?
> > Bob
> >
> >
> >
> >
>
>
>
>

Edwin van der Velden
3-Jul-2007, 01:56 AM
Can you reproduce this in any of the example applications? Because either I
don't understand what you mean exactly or I just can't seem to reproduce the
behavior.

-Edwin


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:$q9pv$1uHHA.5736@dacmail.dataaccess.com...
> One point of clarification on this... the behavior only seems to happen
> when
> adding a new record. In fact the grid seems to behave rather strangely in
> that the row clears and some of the other records disappear -- it's
> obviously resorting itself. I'd expect the row to remain along with all
> that were previously on the screen... but of course this isn't Windows.
> Making a change to an existing row works as expected.
>
> Oh, and the arrow keys don't work in a grid, is that by design or an
> oversight?
>
> Bob
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:OH55L60uHHA.5828@dacmail.dataaccess.com...
>> I found the AutoClearDeoState property and have successfully used it but
>> have noticed that it apparently doesn't extend to any grids used in the
> same
>> program. If for example you add a line to a grid and click the save
> button,
>> the grid line will clear. It's kind of important to have the non-clear
>> functionality in the grid too, since on occasion I need to auto-save a
> line
>> and go on with what's happening. Or did I miss something?
>> Bob
>>
>>
>>
>>
>
>
>

Bob Worsley
3-Jul-2007, 08:56 AM
In the order entry example, find any set of records, header and detail.
Go to the grid and add a record below the last one
Enter the data
Click the save button in the toolbar
The record will save, but the grid jumps to a blank line. If this is a
"feature" and the user is positioned for a new record, how do I turn it off?
If sending a "doSave" from behind the scenes, this behavior kills me because
I need the grid to remain on the "new" record.
Bob


"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:m4$ZX9TvHHA.5828@dacmail.dataaccess.com...
> Can you reproduce this in any of the example applications? Because either
I
> don't understand what you mean exactly or I just can't seem to reproduce
the
> behavior.
>
> -Edwin
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:$q9pv$1uHHA.5736@dacmail.dataaccess.com...
> > One point of clarification on this... the behavior only seems to happen
> > when
> > adding a new record. In fact the grid seems to behave rather strangely
in
> > that the row clears and some of the other records disappear -- it's
> > obviously resorting itself. I'd expect the row to remain along with all
> > that were previously on the screen... but of course this isn't Windows.
> > Making a change to an existing row works as expected.
> >
> > Oh, and the arrow keys don't work in a grid, is that by design or an
> > oversight?
> >
> > Bob
> >
> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> > news:OH55L60uHHA.5828@dacmail.dataaccess.com...
> >> I found the AutoClearDeoState property and have successfully used it
but
> >> have noticed that it apparently doesn't extend to any grids used in the
> > same
> >> program. If for example you add a line to a grid and click the save
> > button,
> >> the grid line will clear. It's kind of important to have the non-clear
> >> functionality in the grid too, since on occasion I need to auto-save a
> > line
> >> and go on with what's happening. Or did I miss something?
> >> Bob
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
>

Edwin van der Velden
3-Jul-2007, 10:01 AM
Ok, I see what you mean. The selection indeed seems to jump to a new row
when adding a new record "by design" and it does not have any built in
option to turn this off (other then disabling the new row completely but
that would disable the ability ro add new records completely).

The location you want to look to change this is the file VdfList.js and the
function VdfList.prototype.handleAutoFindRefresh = function(aNewRecords,
sName)

In this function in the top part of the if statements where
if(sName.indexOf("_CompleteTop") != -1){ you see a line:

this.select(this.aRecords[this.aRecords.length - 1]);

Changing this to

if (this.aRecords.length > 1)
this.select(this.aRecords[this.aRecords.length - 2]);
else this.select(this.aRecords[this.aRecords.length - 1]);

will select the second to last line instead of the last, since the last is
the new row the second to last will be the bottom record and should be the
record you just added.

Doing this will change the code so it will change the behavior for all the
grids you have so you can't choose for each grid individually. I'll look
into adding some property so you can select it per grid for the 1.1 release.

-Edwin

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:HpaDEnXvHHA.1992@dacmail.dataaccess.com...
> In the order entry example, find any set of records, header and detail.
> Go to the grid and add a record below the last one
> Enter the data
> Click the save button in the toolbar
> The record will save, but the grid jumps to a blank line. If this is a
> "feature" and the user is positioned for a new record, how do I turn it
> off?
> If sending a "doSave" from behind the scenes, this behavior kills me
> because
> I need the grid to remain on the "new" record.
> Bob
>
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:m4$ZX9TvHHA.5828@dacmail.dataaccess.com...
>> Can you reproduce this in any of the example applications? Because either
> I
>> don't understand what you mean exactly or I just can't seem to reproduce
> the
>> behavior.
>>
>> -Edwin
>>
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:$q9pv$1uHHA.5736@dacmail.dataaccess.com...
>> > One point of clarification on this... the behavior only seems to happen
>> > when
>> > adding a new record. In fact the grid seems to behave rather strangely
> in
>> > that the row clears and some of the other records disappear -- it's
>> > obviously resorting itself. I'd expect the row to remain along with
>> > all
>> > that were previously on the screen... but of course this isn't Windows.
>> > Making a change to an existing row works as expected.
>> >
>> > Oh, and the arrow keys don't work in a grid, is that by design or an
>> > oversight?
>> >
>> > Bob
>> >
>> > "Bob Worsley" <bworsley@comcast.net> wrote in message
>> > news:OH55L60uHHA.5828@dacmail.dataaccess.com...
>> >> I found the AutoClearDeoState property and have successfully used it
> but
>> >> have noticed that it apparently doesn't extend to any grids used in
>> >> the
>> > same
>> >> program. If for example you add a line to a grid and click the save
>> > button,
>> >> the grid line will clear. It's kind of important to have the
>> >> non-clear
>> >> functionality in the grid too, since on occasion I need to auto-save a
>> > line
>> >> and go on with what's happening. Or did I miss something?
>> >> Bob
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
3-Jul-2007, 03:13 PM
It looks like it works, though I'm not sure if relying on the user always
appending a new row on the bottom of the list is a good thing. I know that
Shift+F10 doesn't work, so we can't insert records that way... is there
another? I was concerned that if the row being added triggered a resort of
the records, what then. It did seem to hold the record, so we will have to
test and see. Thanks...
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:4xEgWMYvHHA.384@dacmail.dataaccess.com...
> Ok, I see what you mean. The selection indeed seems to jump to a new row
> when adding a new record "by design" and it does not have any built in
> option to turn this off (other then disabling the new row completely but
> that would disable the ability ro add new records completely).
>
> The location you want to look to change this is the file VdfList.js and
the
> function VdfList.prototype.handleAutoFindRefresh = function(aNewRecords,
> sName)
>
> In this function in the top part of the if statements where
> if(sName.indexOf("_CompleteTop") != -1){ you see a line:
>
> this.select(this.aRecords[this.aRecords.length - 1]);
>
> Changing this to
>
> if (this.aRecords.length > 1)
> this.select(this.aRecords[this.aRecords.length - 2]);
> else this.select(this.aRecords[this.aRecords.length - 1]);
>
> will select the second to last line instead of the last, since the last is
> the new row the second to last will be the bottom record and should be the
> record you just added.
>
> Doing this will change the code so it will change the behavior for all the
> grids you have so you can't choose for each grid individually. I'll look
> into adding some property so you can select it per grid for the 1.1
release.
>
> -Edwin
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:HpaDEnXvHHA.1992@dacmail.dataaccess.com...
> > In the order entry example, find any set of records, header and detail.
> > Go to the grid and add a record below the last one
> > Enter the data
> > Click the save button in the toolbar
> > The record will save, but the grid jumps to a blank line. If this is a
> > "feature" and the user is positioned for a new record, how do I turn it
> > off?
> > If sending a "doSave" from behind the scenes, this behavior kills me
> > because
> > I need the grid to remain on the "new" record.
> > Bob
> >
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:m4$ZX9TvHHA.5828@dacmail.dataaccess.com...
> >> Can you reproduce this in any of the example applications? Because
either
> > I
> >> don't understand what you mean exactly or I just can't seem to
reproduce
> > the
> >> behavior.
> >>
> >> -Edwin
> >>
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:$q9pv$1uHHA.5736@dacmail.dataaccess.com...
> >> > One point of clarification on this... the behavior only seems to
happen
> >> > when
> >> > adding a new record. In fact the grid seems to behave rather
strangely
> > in
> >> > that the row clears and some of the other records disappear -- it's
> >> > obviously resorting itself. I'd expect the row to remain along with
> >> > all
> >> > that were previously on the screen... but of course this isn't
Windows.
> >> > Making a change to an existing row works as expected.
> >> >
> >> > Oh, and the arrow keys don't work in a grid, is that by design or an
> >> > oversight?
> >> >
> >> > Bob
> >> >
> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> > news:OH55L60uHHA.5828@dacmail.dataaccess.com...
> >> >> I found the AutoClearDeoState property and have successfully used it
> > but
> >> >> have noticed that it apparently doesn't extend to any grids used in
> >> >> the
> >> > same
> >> >> program. If for example you add a line to a grid and click the save
> >> > button,
> >> >> the grid line will clear. It's kind of important to have the
> >> >> non-clear
> >> >> functionality in the grid too, since on occasion I need to auto-save
a
> >> > line
> >> >> and go on with what's happening. Or did I miss something?
> >> >> Bob
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Edwin van der Velden
4-Jul-2007, 02:21 AM
Well the rows can only be added at the bottom for now yes, but a resort
occuring is an option I wouldn't rule out.
I'll be looking into it for the next release and see if I can make a
reliable change there, especially since the shift-f10 funcitonality is still
on our wishlist

-Edwin


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:Zetto5avHHA.384@dacmail.dataaccess.com...
> It looks like it works, though I'm not sure if relying on the user always
> appending a new row on the bottom of the list is a good thing. I know
> that
> Shift+F10 doesn't work, so we can't insert records that way... is there
> another? I was concerned that if the row being added triggered a resort
> of
> the records, what then. It did seem to hold the record, so we will have
> to
> test and see. Thanks...
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:4xEgWMYvHHA.384@dacmail.dataaccess.com...
>> Ok, I see what you mean. The selection indeed seems to jump to a new row
>> when adding a new record "by design" and it does not have any built in
>> option to turn this off (other then disabling the new row completely but
>> that would disable the ability ro add new records completely).
>>
>> The location you want to look to change this is the file VdfList.js and
> the
>> function VdfList.prototype.handleAutoFindRefresh = function(aNewRecords,
>> sName)
>>
>> In this function in the top part of the if statements where
>> if(sName.indexOf("_CompleteTop") != -1){ you see a line:
>>
>> this.select(this.aRecords[this.aRecords.length - 1]);
>>
>> Changing this to
>>
>> if (this.aRecords.length > 1)
>> this.select(this.aRecords[this.aRecords.length - 2]);
>> else this.select(this.aRecords[this.aRecords.length - 1]);
>>
>> will select the second to last line instead of the last, since the last
>> is
>> the new row the second to last will be the bottom record and should be
>> the
>> record you just added.
>>
>> Doing this will change the code so it will change the behavior for all
>> the
>> grids you have so you can't choose for each grid individually. I'll look
>> into adding some property so you can select it per grid for the 1.1
> release.
>>
>> -Edwin
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:HpaDEnXvHHA.1992@dacmail.dataaccess.com...
>> > In the order entry example, find any set of records, header and detail.
>> > Go to the grid and add a record below the last one
>> > Enter the data
>> > Click the save button in the toolbar
>> > The record will save, but the grid jumps to a blank line. If this is a
>> > "feature" and the user is positioned for a new record, how do I turn it
>> > off?
>> > If sending a "doSave" from behind the scenes, this behavior kills me
>> > because
>> > I need the grid to remain on the "new" record.
>> > Bob
>> >
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:m4$ZX9TvHHA.5828@dacmail.dataaccess.com...
>> >> Can you reproduce this in any of the example applications? Because
> either
>> > I
>> >> don't understand what you mean exactly or I just can't seem to
> reproduce
>> > the
>> >> behavior.
>> >>
>> >> -Edwin
>> >>
>> >>
>> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> news:$q9pv$1uHHA.5736@dacmail.dataaccess.com...
>> >> > One point of clarification on this... the behavior only seems to
> happen
>> >> > when
>> >> > adding a new record. In fact the grid seems to behave rather
> strangely
>> > in
>> >> > that the row clears and some of the other records disappear -- it's
>> >> > obviously resorting itself. I'd expect the row to remain along with
>> >> > all
>> >> > that were previously on the screen... but of course this isn't
> Windows.
>> >> > Making a change to an existing row works as expected.
>> >> >
>> >> > Oh, and the arrow keys don't work in a grid, is that by design or an
>> >> > oversight?
>> >> >
>> >> > Bob
>> >> >
>> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> > news:OH55L60uHHA.5828@dacmail.dataaccess.com...
>> >> >> I found the AutoClearDeoState property and have successfully used
>> >> >> it
>> > but
>> >> >> have noticed that it apparently doesn't extend to any grids used in
>> >> >> the
>> >> > same
>> >> >> program. If for example you add a line to a grid and click the
>> >> >> save
>> >> > button,
>> >> >> the grid line will clear. It's kind of important to have the
>> >> >> non-clear
>> >> >> functionality in the grid too, since on occasion I need to
>> >> >> auto-save
> a
>> >> > line
>> >> >> and go on with what's happening. Or did I miss something?
>> >> >> Bob
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>