FoxInCloud
Grid Current Record Display
Gravatar is a globally recognized avatar based on your email address. Grid Current Record Display
  n/a
  All
  Jul 10, 2015 @ 03:19am
I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 10, 2015 @ 03:51am
Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && <<a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html" target="top" >>http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html<</a>>
var obj = $('<<m.this.wcID>>').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James


-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 10, 2015 @ 04:00am
No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James



Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 10, 2015 @ 04:01am
you did right
can you post your form.js?


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James



-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 10, 2015 @ 04:11am
can you try this code variant?

text to cScriptJS textmerge noshow flag 1 pretext 3 && <<a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html" target="top" >>http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html<</a>>
var obj = $('<<m.this.wcID>>').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
$('<<m.this.wcID>>').update(obj); // new line
endtext


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James



-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 10, 2015 @ 04:25am
I started Firebug and then the form. I went to Script and then selected MyFormName_scx.js, which I think is what you want. At 1300 lines, are you sure you want me to post it here as code?

- James


you did right
can you post your form.js?


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James



Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 10, 2015 @ 04:31am
you've got the source file in your site folder
you can either post or mail
posting will at least show the volume of JS code foxInCloud saves writing!


I started Firebug and then the form. I went to Script and then selected MyFormName_scx.js, which I think is what you want. At 1300 lines, are you sure you want me to post it here as code?

- James


you did right
can you post your form.js?


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James





-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 10, 2015 @ 04:35am
Just tried, but does not work.

- James


can you try this code variant?

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
$('').update(obj); // new line
endtext


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James



Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 10, 2015 @ 04:39am
of course you're aware that this ww message board strips off textmerge delimiters ('< <' and '> >') and their content ...


Just tried, but does not work.

- James


can you try this code variant?

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
$('').update(obj); // new line
endtext


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James




Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 10, 2015 @ 04:45am
Site, of course, I keep forgetting I generated the site...

No problem listing JS. This does NOT include any changes to grid.wcHTMLgen. You are correct, the volume of script is overwhelming...

Grid of interest is "ShippingGrid".

- James

/* Generated on 07/10/15 10:39:30 AM in 4.766 sec by FoxInCloud version 2.20 beta07 -- *//
jQuery.datepicker.setDefaults(Object.extend(jQuery.datepicker.regional['en']||jQuery.datepicker.regional[''], {dateFormat: 'mm/dd/y', onSelect: function(date){FoxInCloud.EventRequest('DOMEvent','blur', this, date)}, altField: ''}));
$('orders_scx-waitpic').effectShow=true;
$('orders_scx-waitpic').effectHide=true;
$('orders_scx-command4').effectShow=true;
$('orders_scx-command4').effectHide=true;
$('orders_scx-tedlabel1').effectShow=true;
$('orders_scx-tedlabel1').effectHide=true;
$('orders_scx-command2').effectShow=true;
$('orders_scx-command2').effectHide=true;
$('orders_scx-command1').disabled=true;
$('orders_scx-command1').effectShow=true;
$('orders_scx-command1').effectHide=true;
$('orders_scx-txtcust_name').readOnly=true;
$('orders_scx-txtcust_name').effectShow=true;
$('orders_scx-txtcust_name').effectHide=true;
(function(){
var dStart = new Date();
var grd = $('orders_scx-frame-page1-searchgrid');
if (grd){
Object.extend(grd, {oGrid: new AW.UI.Grid, oTable: new AW.XML.Table});
var oGrid = $('orders_scx-frame-page1-searchgrid').oGrid, oTable = $('orders_scx-frame-page1-searchgrid').oTable, oTempl;
oGrid.defineControlProperty('DataUpdate', false);
oGrid.defineCellProperty('CurrentControl', null);
oGrid.setSelectorWidth(10);
oGrid.getSelectorTemplate().setStyle('font-weight','bold');
oGrid.setRowCount(0);
oGrid.setCurrentColumn(-1);
oGrid.setCurrentRow(-1);
oGrid.setSelectionMode('single-row');
oGrid.setStyle('background-color','#EDEDED');
oGrid.clearColumnModel();
oGrid.setColumnCount(3);
oGrid.setStyle('font-family','Arial');
oGrid.setStyle('font-size','9pt');
oGrid.setHeaderHeight(19);
oGrid.setSize(undefined,144);
oGrid.setSelectorVisible(true);
oGrid.setScrollBars('vertical');
oGrid.setSize(392,undefined);
oGrid.setColumnIndices([0,1,2]);
oGrid.setColumnResizable(true,0);
oGrid.setColumnWidth(217+1,0);
oGrid.setHeaderText('Description',0);
oGrid.setColumnResizable(true,1);
oGrid.setColumnWidth(66+1,1);
oGrid.setHeaderText('Order',1);
oGrid.setColumnResizable(true,2);
oGrid.setColumnWidth(67+1,2);
oGrid.setHeaderText('Date',2);


/* Column 0 'Column1' *//
oTempl = oGrid.getHeaderTemplate(0);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(0);
oTempl.setStyle('text-align','left');

/* Column 1 'Column2' *//
oTempl = oGrid.getHeaderTemplate(1);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
var fmt = new AW.Formats.Number;
fmt.setTextFormat('###');
oGrid.setCellFormat(fmt,1,undefined);
oTempl = oGrid.getCellTemplate(1);
oTempl.setStyle('text-align','right');

/* Column 2 'Column3' *//
oTempl = oGrid.getHeaderTemplate(2);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
var fmt = new AW.Formats.DateVFP;
fmt.setDataFormat('ISO8601');
fmt.setTextTimezone(0);
fmt.setTextFormat('mm/dd/yy');
oGrid.setCellFormat(fmt,2,undefined);
oTempl = oGrid.getCellTemplate(2);
oTempl.setStyle('text-align','right');

oGrid.setSortDirection();
oGrid.setSortDirection('ascending', 0);
oGrid.refresh();
oGrid.defineRowProperty('tuRow', null);
oGrid.defineRowProperty('Clicked', false);
oGrid.onRowMouseDown = function(event, row){this.setRowClicked(true, row)};
oGrid.onRowMouseUp = function(event, row){this.setRowClicked(false, row)};
oGrid.onCurrentRowChanged = function(row){
var value = this.getRowProperty('tuRow', row);
if (!(this.disabled || value === null)){
if (!this.getRowClicked(row) && FoxInCloud.gridRowChangeDelay > 0){
if (this.nTO) window.clearTimeout(this.nTO);
this.nTO = FoxInCloud.gridMethod.bind(FoxInCloud).delay(FoxInCloud.gridRowChangeDelay, 'wAfterRowChange', $('orders_scx-frame-page1-searchgrid'), value);
}
else FoxInCloud.gridMethod('wAfterRowChange', $('orders_scx-frame-page1-searchgrid'), value);
}
this.setRowClicked(false, row);
};


oGrid.onCellValidating = function(text, col, row){
col = parseInt(col, 10);
var result, dynCC, template, readOnly, disabled;
if (typeof row === 'undefined') {
template = this.getCellTemplate(col);
}
else {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
template = this.getCellTemplate(col,row);
}
if (template.disabled) return;
if (typeof text === 'string'){
var fmt = this.getCellFormat(col, row);
var value = fmt ? fmt.textToValue(text) : text;
}
if (template.readOnly) return;
switch (col){
case 0: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-searchgrid'), value, 'orders_scx-frame-page1-searchgrid-column1-text1', true);break;}
case 1: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-searchgrid'), value, 'orders_scx-frame-page1-searchgrid-column2-text1', true);break;}
case 2: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-searchgrid'), value, 'orders_scx-frame-page1-searchgrid-column3-text1', true);break;}
}
var cols = this.getColumnCount(), rows = this.getRowCount(), done = false;
col++;
while (row < rows && !done) {
if (this.getCellEditable(col,row)) {
this.setSelectedColumns([col]);
this.setSelectedRows([row]);
this.setCurrentColumn(col);
this.setCurrentRow(row);
done = true;
}
else {
col++;
if (col >= cols){
col = 0;
row++;
}
}
}
return result;
};

oGrid.onKeyBackspace = function(event){
Event.extend(event).stop();
};

oGrid.setSelectedRows([-1]);
oGrid.setSelectedRows([-1]);
oGrid.disabled = true;
oGrid.setCurrentRow(-1);
oGrid.disabled = false;
grd.update(oGrid);
}
dStart = new Date() - dStart;
window.console && console.log && console.log("'orders_scx-frame-page1-searchgrid' grid script took 62 ms to generate on the server, " + dStart + " ms to execute on the browser, total " + (dStart + 62) + " ms.\n" + '07/10/15 10:39:26 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_oxmlchanges() - 15 ms\n07/10/15 10:39:26 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_rs() - 0 ms\n07/10/15 10:39:26 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_events() - 47 ms');
})();
$('orders_scx-frame-page1-searchgrid').readOnly=true;
$('orders_scx-frame-page1-searchcontainer-command1').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-command1').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-tedcommandbutton1').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-tedcommandbutton1').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel4').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel4').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel5').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel5').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-txtsearchdesc').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-txtsearchdesc').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-txtponumber').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-txtponumber').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-txtorder_num').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-txtorder_num').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-txtrecordsfound').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-txtrecordsfound').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-txtstart_date').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-txtstart_date').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-txtend_date').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-txtend_date').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel2').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel2').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel1').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel1').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel3').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-tedlabel3').effectHide=true;
$('orders_scx-frame-page1-searchcontainer-inetlabel1').effectShow=true;
$('orders_scx-frame-page1-searchcontainer-inetlabel1').effectHide=true;
$('orders_scx-frame-page1-searchcontainer').effectShow=true;
$('orders_scx-frame-page1-searchcontainer').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtorder_num').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtorder_num').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtorder_num').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtsale_date').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtsale_date').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtsale_date').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtdate_due').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtdate_due').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtdate_due').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtuser').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtuser').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtuser').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtcust_po').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtcust_po').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtcust_po').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtsale_notes').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtsale_notes').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtsale_notes').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtinvo_note').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtinvo_note').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtinvo_note').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-txtwhy_delete').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-txtwhy_delete').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-txtwhy_delete').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel2').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel2').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-inetlabel1').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-inetlabel1').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel1').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel1').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-lblpomessage').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-lblpomessage').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel6').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel6').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel4').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel4').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel5').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel5').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-errdate_due').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-errdate_due').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-errwhy_delete').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-errwhy_delete').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-errcust_po').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-errcust_po').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel3').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel3').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel7').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel7').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel8').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel8').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel9').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-tedlabel9').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-chkcleared').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkcleared_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkcleared').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-chkcleared').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-chka_blanket').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chka_blanket_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chka_blanket').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-chka_blanket').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-chkpacklist').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkpacklist_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkpacklist').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-chkpacklist').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-chkinvoiceall').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkinvoiceall_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkinvoiceall').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-chkinvoiceall').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-chkcomplete').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkcomplete_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkcomplete').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-chkcomplete').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-chkdelay_release').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkdelay_release_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-chkdelay_release').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-chkdelay_release').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-findcust_po').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-findcust_po').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-findcust_po').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-combopriority').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-combopriority').selectedIndex=-1;
$('orders_scx-frame-page1-orderframe-page1-combopriority').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-combopriority').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1-comboinvo_info').disabled=true;
$('orders_scx-frame-page1-orderframe-page1-comboinvo_info').selectedIndex=-1;
$('orders_scx-frame-page1-orderframe-page1-comboinvo_info').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1-comboinvo_info').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1').effectShow=true;
$('orders_scx-frame-page1-orderframe-page1').effectHide=true;
(function(){
var dStart = new Date();
var grd = $('orders_scx-frame-page1-orderframe-page2-shippinggrid');
if (grd){
Object.extend(grd, {oGrid: new AW.UI.Grid, oTable: new AW.XML.Table});
var oGrid = $('orders_scx-frame-page1-orderframe-page2-shippinggrid').oGrid, oTable = $('orders_scx-frame-page1-orderframe-page2-shippinggrid').oTable, oTempl;
oGrid.defineControlProperty('DataUpdate', false);
oGrid.defineCellProperty('CurrentControl', null);
oGrid.setSelectorWidth(10);
oGrid.getSelectorTemplate().setStyle('font-weight','bold');
oGrid.setRowCount(0);
oGrid.setCurrentColumn(-1);
oGrid.setCurrentRow(-1);
oGrid.setStyle('background-color','#EDEDED');
oGrid.clearColumnModel();
oGrid.setColumnCount(6);
oGrid.setStyle('font-family','Arial');
oGrid.setStyle('font-size','9pt');
oGrid.setHeaderHeight(19);
oGrid.setSize(undefined,81);
oGrid.setSelectorVisible(true);
oGrid.setScrollBars('vertical');
oGrid.setSize(680,undefined);
oGrid.setColumnIndices([0,1,2,3,4,5]);
oGrid.setColumnResizable(true,0);
oGrid.setColumnWidth(193+1,0);
oGrid.setHeaderText('Ship To',0);
oGrid.setColumnResizable(true,1);
oGrid.setColumnWidth(154+1,1);
oGrid.setHeaderText('Shipping Address 1',1);
oGrid.setColumnResizable(true,2);
oGrid.setColumnWidth(134+1,2);
oGrid.setHeaderText('City',2);
oGrid.setColumnResizable(true,3);
oGrid.setColumnWidth(25+1,3);
oGrid.setHeaderText('ST',3);
oGrid.setColumnResizable(true,4);
oGrid.setColumnWidth(75+1,4);
oGrid.setHeaderText('Zip Code',4);
oGrid.setColumnResizable(true,5);
oGrid.setColumnWidth(55+1,5);
oGrid.setHeaderText('Default',5);


/* Column 0 'Column1' *//
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(0);
oTempl.setStyle('text-align','left');

/* Column 1 'Column2' *//
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(1);
oTempl.setStyle('text-align','left');

/* Column 2 'Column3' *//
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(2);
oTempl.setStyle('text-align','left');

/* Column 3 'Column4' *//
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(3);
oTempl.setStyle('text-align','left');

/* Column 4 'Column5' *//
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(4);
oTempl.setStyle('text-align','left');

/* Column 5 'Column6' *//
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(5);
oTempl.setStyle('text-align','left');

oGrid.setSortDirection();
oGrid.refresh();
oGrid.defineRowProperty('tuRow', null);
oGrid.defineRowProperty('Clicked', false);
oGrid.onRowMouseDown = function(event, row){this.setRowClicked(true, row)};
oGrid.onRowMouseUp = function(event, row){this.setRowClicked(false, row)};
oGrid.onCurrentRowChanged = function(row){
var value = this.getRowProperty('tuRow', row);
if (!(this.disabled || value === null)){
if (!this.getRowClicked(row) && FoxInCloud.gridRowChangeDelay > 0){
if (this.nTO) window.clearTimeout(this.nTO);
this.nTO = FoxInCloud.gridMethod.bind(FoxInCloud).delay(FoxInCloud.gridRowChangeDelay, 'wAfterRowChange', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value);
}
else FoxInCloud.gridMethod('wAfterRowChange', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value);
}
this.setRowClicked(false, row);
};


oGrid.onCellValidating = function(text, col, row){
col = parseInt(col, 10);
var result, dynCC, template, readOnly, disabled;
if (typeof row === 'undefined') {
template = this.getCellTemplate(col);
}
else {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
template = this.getCellTemplate(col,row);
}
if (template.disabled) return;
if (typeof text === 'string'){
var fmt = this.getCellFormat(col, row);
var value = fmt ? fmt.textToValue(text) : text;
}
if (template.readOnly) return;
switch (col){
case 0: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value, 'orders_scx-frame-page1-orderframe-page2-shippinggrid-column1-text1', true);break;}
case 1: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value, 'orders_scx-frame-page1-orderframe-page2-shippinggrid-column2-text1', true);break;}
case 2: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value, 'orders_scx-frame-page1-orderframe-page2-shippinggrid-column3-text1', true);break;}
case 3: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value, 'orders_scx-frame-page1-orderframe-page2-shippinggrid-column4-text1', true);break;}
case 4: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value, 'orders_scx-frame-page1-orderframe-page2-shippinggrid-column5-text1', true);break;}
case 5: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page1-orderframe-page2-shippinggrid'), value, 'orders_scx-frame-page1-orderframe-page2-shippinggrid-column6-text1', true);break;}
}
var cols = this.getColumnCount(), rows = this.getRowCount(), done = false;
col++;
while (row < rows && !done) {
if (this.getCellEditable(col,row)) {
this.setSelectedColumns([col]);
this.setSelectedRows([row]);
this.setCurrentColumn(col);
this.setCurrentRow(row);
done = true;
}
else {
col++;
if (col >= cols){
col = 0;
row++;
}
}
}
return result;
};

oGrid.onKeyBackspace = function(event){
Event.extend(event).stop();
};

oGrid.setSelectedRows([-1]);
oGrid.setSelectedRows([-1]);
oGrid.setSelectedColumns([0]);
oGrid.disabled = true;
oGrid.setCurrentRow(-1);
oGrid.setCurrentColumn(0);
oGrid.disabled = false;
grd.update(oGrid);
}
dStart = new Date() - dStart;
window.console && console.log && console.log("'orders_scx-frame-page1-orderframe-page2-shippinggrid' grid script took 203 ms to generate on the server, " + dStart + " ms to execute on the browser, total " + (dStart + 203) + " ms.\n" + '07/10/15 10:39:27 AM - awhtml.fxp!Oshippinggrid.gethtml_grd_aw_cscript_oxmlchanges() - 15 ms\n07/10/15 10:39:27 AM - awhtml.fxp!Oshippinggrid.gethtml_grd_aw_cscript_rs() - 0 ms\n07/10/15 10:39:27 AM - awhtml.fxp!Oshippinggrid.gethtml_grd_aw_cscript_events() - 156 ms\n07/10/15 10:39:27 AM - awhtml.fxp!Oshippinggrid.gethtml_grd_aw_cscript_() - 172 ms');
})();
$('orders_scx-frame-page1-orderframe-page2-shippinggrid').readOnly=true;
$('orders_scx-frame-page1-orderframe-page2-command2').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-command2').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_to').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_to').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_to').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-command3').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-command3').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_add_1').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_add_1').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_add_1').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_add_2').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_add_2').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_add_2').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_city').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_city').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_city').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_state').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_state').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_state').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_zip').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_zip').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-txtship_zip').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-tedlabel9').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-tedlabel9').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-command1').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-command1').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-errship_to').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-errship_to').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-errship_add_1').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-errship_add_1').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-errship_add_2').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-errship_add_2').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-errship_city').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-errship_city').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-errship_zip').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-errship_zip').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-errship_state').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-errship_state').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-chkdefault').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-chkdefault_lbl').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-chkdefault').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-chkdefault').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2-comboshipby').disabled=true;
$('orders_scx-frame-page1-orderframe-page2-comboshipby').selectedIndex=-1;
$('orders_scx-frame-page1-orderframe-page2-comboshipby').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2-comboshipby').effectHide=true;
$('orders_scx-frame-page1-orderframe-page2').effectShow=true;
$('orders_scx-frame-page1-orderframe-page2').effectHide=true;
$('orders_scx-frame-page1-orderframe-page1').lActivateSend=true;
$('orders_scx-frame-page1-orderframe-page2').lActivateSend=true;
FoxInCloud.pgfMake('orders_scx-frame-page1-orderframe', 'orders_scx-frame-page1-orderframe-page1', false, [], true, false, 0, 0);
$('orders_scx-frame-page1-orderframe').effectShow=true;
$('orders_scx-frame-page1-orderframe').effectHide=true;
$('orders_scx-frame-page1').effectShow=true;
$('orders_scx-frame-page1').effectHide=true;
(function(){
var dStart = new Date();
var grd = $('orders_scx-frame-page2-detailgrid');
if (grd){
Object.extend(grd, {oGrid: new AW.UI.Grid, oTable: new AW.XML.Table});
var oGrid = $('orders_scx-frame-page2-detailgrid').oGrid, oTable = $('orders_scx-frame-page2-detailgrid').oTable, oTempl;
oGrid.defineControlProperty('DataUpdate', false);
oGrid.defineCellProperty('CurrentControl', null);
oGrid.setSelectorWidth(10);
oGrid.getSelectorTemplate().setStyle('font-weight','bold');
oGrid.setRowCount(0);
oGrid.setCurrentColumn(-1);
oGrid.setCurrentRow(-1);
oGrid.setStyle('background-color','#EDEDED');
oGrid.clearColumnModel();
oGrid.setColumnCount(4);
oGrid.setStyle('font-family','Arial');
oGrid.setStyle('font-size','9pt');
oGrid.setHeaderHeight(19);
oGrid.setSize(undefined,144);
oGrid.setSelectorVisible(true);
oGrid.setScrollBars('vertical');
oGrid.setSize(672,undefined);
oGrid.setColumnIndices([0,1,2,3]);
oGrid.setColumnResizable(true,0);
oGrid.setColumnWidth(73+1,0);
oGrid.setHeaderText('Quantity',0);
oGrid.setColumnResizable(true,1);
oGrid.setColumnWidth(49+1,1);
oGrid.setHeaderText('UM',1);
oGrid.setColumnResizable(true,2);
oGrid.setColumnWidth(426+1,2);
oGrid.setHeaderText('Description',2);
oGrid.setColumnResizable(true,3);
oGrid.setColumnWidth(78+1,3);
oGrid.setHeaderText('Part',3);


/* Column 0 'Column1' *//
oTempl = oGrid.getHeaderTemplate(0);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
var fmt = new AW.Formats.Number;
fmt.setTextFormat('###');
oGrid.setCellFormat(fmt,0,undefined);
oTempl = oGrid.getCellTemplate(0);
oTempl.setStyle('text-align','right');

/* Column 1 'Column2' *//
oTempl = oGrid.getHeaderTemplate(1);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(1);
oTempl.setStyle('text-align','left');

/* Column 2 'Column3' *//
oTempl = oGrid.getHeaderTemplate(2);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(2);
oTempl.setStyle('text-align','left');

/* Column 3 'Column4' *//
oTempl = oGrid.getHeaderTemplate(3);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(3);
oTempl.setStyle('text-align','left');

oGrid.setSortDirection();
oGrid.refresh();
oGrid.defineRowProperty('tuRow', null);
oGrid.defineRowProperty('Clicked', false);
oGrid.onRowMouseDown = function(event, row){this.setRowClicked(true, row)};
oGrid.onRowMouseUp = function(event, row){this.setRowClicked(false, row)};
oGrid.onCurrentRowChanged = function(row){
var value = this.getRowProperty('tuRow', row);
if (!(this.disabled || value === null)){
if (!this.getRowClicked(row) && FoxInCloud.gridRowChangeDelay > 0){
if (this.nTO) window.clearTimeout(this.nTO);
this.nTO = FoxInCloud.gridMethod.bind(FoxInCloud).delay(FoxInCloud.gridRowChangeDelay, 'wAfterRowChange', $('orders_scx-frame-page2-detailgrid'), value);
}
else FoxInCloud.gridMethod('wAfterRowChange', $('orders_scx-frame-page2-detailgrid'), value);
}
this.setRowClicked(false, row);
};


oGrid.onCellValidating = function(text, col, row){
col = parseInt(col, 10);
var result, dynCC, template, readOnly, disabled;
if (typeof row === 'undefined') {
template = this.getCellTemplate(col);
}
else {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
template = this.getCellTemplate(col,row);
}
if (template.disabled) return;
if (typeof text === 'string'){
var fmt = this.getCellFormat(col, row);
var value = fmt ? fmt.textToValue(text) : text;
}
if (template.readOnly) return;
switch (col){
case 0: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page2-detailgrid'), value, 'orders_scx-frame-page2-detailgrid-column1-text1', true);break;}
case 1: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page2-detailgrid'), value, 'orders_scx-frame-page2-detailgrid-column2-text1', true);break;}
case 2: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page2-detailgrid'), value, 'orders_scx-frame-page2-detailgrid-column3-text1', true);break;}
case 3: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page2-detailgrid'), value, 'orders_scx-frame-page2-detailgrid-column4-text1', true);break;}
}
var cols = this.getColumnCount(), rows = this.getRowCount(), done = false;
col++;
while (row < rows && !done) {
if (this.getCellEditable(col,row)) {
this.setSelectedColumns([col]);
this.setSelectedRows([row]);
this.setCurrentColumn(col);
this.setCurrentRow(row);
done = true;
}
else {
col++;
if (col >= cols){
col = 0;
row++;
}
}
}
return result;
};

oGrid.onKeyBackspace = function(event){
Event.extend(event).stop();
};

oGrid.setSelectedRows([-1]);
oGrid.setSelectedRows([-1]);
oGrid.setSelectedColumns([0]);
oGrid.disabled = true;
oGrid.setCurrentRow(-1);
oGrid.setCurrentColumn(0);
oGrid.disabled = false;
grd.update(oGrid);
}
dStart = new Date() - dStart;
window.console && console.log && console.log("'orders_scx-frame-page2-detailgrid' grid script took 79 ms to generate on the server, " + dStart + " ms to execute on the browser, total " + (dStart + 79) + " ms.\n" + '07/10/15 10:39:27 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_oxmlchanges() - 32 ms\n07/10/15 10:39:27 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_rs() - 0 ms\n07/10/15 10:39:27 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_events() - 47 ms');
})();
$('orders_scx-frame-page2-detailgrid').readOnly=true;
$('orders_scx-frame-page2-txtworked').disabled=true;
$('orders_scx-frame-page2-txtworked').effectShow=true;
$('orders_scx-frame-page2-txtworked').effectHide=true;
$('orders_scx-frame-page2-txtsource').disabled=true;
$('orders_scx-frame-page2-txtsource').effectShow=true;
$('orders_scx-frame-page2-txtsource').effectHide=true;
$('orders_scx-frame-page2-txtcontact').disabled=true;
$('orders_scx-frame-page2-txtcontact').effectShow=true;
$('orders_scx-frame-page2-txtcontact').effectHide=true;
$('orders_scx-frame-page2-txts_phone').disabled=true;
$('orders_scx-frame-page2-txts_phone').effectShow=true;
$('orders_scx-frame-page2-txts_phone').effectHide=true;
$('orders_scx-frame-page2-txtcust_part').disabled=true;
$('orders_scx-frame-page2-txtcust_part').effectShow=true;
$('orders_scx-frame-page2-txtcust_part').effectHide=true;
$('orders_scx-frame-page2-txtwhy_delete').disabled=true;
$('orders_scx-frame-page2-txtwhy_delete').effectShow=true;
$('orders_scx-frame-page2-txtwhy_delete').effectHide=true;
$('orders_scx-frame-page2-txtprice').disabled=true;
$('orders_scx-frame-page2-txtprice').effectShow=true;
$('orders_scx-frame-page2-txtprice').effectHide=true;
$('orders_scx-frame-page2-txton_hand').disabled=true;
$('orders_scx-frame-page2-txton_hand').effectShow=true;
$('orders_scx-frame-page2-txton_hand').effectHide=true;
$('orders_scx-frame-page2-txtshipped').disabled=true;
$('orders_scx-frame-page2-txtshipped').effectShow=true;
$('orders_scx-frame-page2-txtshipped').effectHide=true;
$('orders_scx-frame-page2-txtreceived').disabled=true;
$('orders_scx-frame-page2-txtreceived').effectShow=true;
$('orders_scx-frame-page2-txtreceived').effectHide=true;
$('orders_scx-frame-page2-txttxtdate_rec').disabled=true;
$('orders_scx-frame-page2-txttxtdate_rec').effectShow=true;
$('orders_scx-frame-page2-txttxtdate_rec').effectHide=true;
$('orders_scx-frame-page2-tedlabel8').effectShow=true;
$('orders_scx-frame-page2-tedlabel8').effectHide=true;
$('orders_scx-frame-page2-tedlabel4').effectShow=true;
$('orders_scx-frame-page2-tedlabel4').effectHide=true;
$('orders_scx-frame-page2-tedlabel6').effectShow=true;
$('orders_scx-frame-page2-tedlabel6').effectHide=true;
$('orders_scx-frame-page2-tedlabel7').effectShow=true;
$('orders_scx-frame-page2-tedlabel7').effectHide=true;
$('orders_scx-frame-page2-tedlabel5').effectShow=true;
$('orders_scx-frame-page2-tedlabel5').effectHide=true;
$('orders_scx-frame-page2-tedlabel3').effectShow=true;
$('orders_scx-frame-page2-tedlabel3').effectHide=true;
$('orders_scx-frame-page2-tedlabel9').effectShow=true;
$('orders_scx-frame-page2-tedlabel9').effectHide=true;
$('orders_scx-frame-page2-tedlabel1').effectShow=true;
$('orders_scx-frame-page2-tedlabel1').effectHide=true;
$('orders_scx-frame-page2-tedlabel10').effectShow=true;
$('orders_scx-frame-page2-tedlabel10').effectHide=true;
$('orders_scx-frame-page2-tedlabel2').effectShow=true;
$('orders_scx-frame-page2-tedlabel2').effectHide=true;
$('orders_scx-frame-page2-tedlabel11').effectShow=true;
$('orders_scx-frame-page2-tedlabel11').effectHide=true;
$('orders_scx-frame-page2-txtdate_due').disabled=true;
$('orders_scx-frame-page2-txtdate_due').effectShow=true;
$('orders_scx-frame-page2-txtdate_due').effectHide=true;
$('orders_scx-frame-page2-tedlabel12').effectShow=true;
$('orders_scx-frame-page2-tedlabel12').effectHide=true;
$('orders_scx-frame-page2-chktaxable').disabled=true;
$('orders_scx-frame-page2-chktaxable_lbl').disabled=true;
$('orders_scx-frame-page2-chktaxable').effectShow=true;
$('orders_scx-frame-page2-chktaxable').effectHide=true;
$('orders_scx-frame-page2-chkclosed').disabled=true;
$('orders_scx-frame-page2-chkclosed_lbl').disabled=true;
$('orders_scx-frame-page2-chkclosed').effectShow=true;
$('orders_scx-frame-page2-chkclosed').effectHide=true;
$('orders_scx-frame-page2-inetcostcoded1').disabled=true;
$('orders_scx-frame-page2-inetcostcoded1-displaytextbox').disabled=true;
$('orders_scx-frame-page2-inetcostcoded1-displaytextbox').readOnly=true;
$('orders_scx-frame-page2-inetcostcoded1-displaytextbox').effectShow=true;
$('orders_scx-frame-page2-inetcostcoded1-displaytextbox').effectHide=true;
$('orders_scx-frame-page2-inetcostcoded1').effectShow=true;
$('orders_scx-frame-page2-inetcostcoded1').effectHide=true;
$('orders_scx-frame-page2').effectShow=true;
$('orders_scx-frame-page2').effectHide=true;
$('orders_scx-frame-page3').disabled=true;
$('orders_scx-frame-page3-chkdeleteout').disabled=true;
$('orders_scx-frame-page3-chkdeleteout_lbl').disabled=true;
$('orders_scx-frame-page3-chkdeleteout').effectShow=true;
$('orders_scx-frame-page3-chkdeleteout').effectHide=true;
$('orders_scx-frame-page3-tedlabel25').effectShow=true;
$('orders_scx-frame-page3-tedlabel25').effectHide=true;
$('orders_scx-frame-page3-command2').effectShow=true;
$('orders_scx-frame-page3-command2').effectHide=true;
$('orders_scx-frame-page3-command3').effectShow=true;
$('orders_scx-frame-page3-command3').effectHide=true;
$('orders_scx-frame-page3-txtvendorpart').disabled=true;
$('orders_scx-frame-page3-txtvendorpart').effectShow=true;
$('orders_scx-frame-page3-txtvendorpart').effectHide=true;
$('orders_scx-frame-page3-txtvendor_nam').disabled=true;
$('orders_scx-frame-page3-txtvendor_nam').effectShow=true;
$('orders_scx-frame-page3-txtvendor_nam').effectHide=true;
$('orders_scx-frame-page3-txtcontact').disabled=true;
$('orders_scx-frame-page3-txtcontact').effectShow=true;
$('orders_scx-frame-page3-txtcontact').effectHide=true;
$('orders_scx-frame-page3-txtwhy_delete').disabled=true;
$('orders_scx-frame-page3-txtwhy_delete').effectShow=true;
$('orders_scx-frame-page3-txtwhy_delete').effectHide=true;
$('orders_scx-frame-page3-txtvend_phone').disabled=true;
$('orders_scx-frame-page3-txtvend_phone').effectShow=true;
$('orders_scx-frame-page3-txtvend_phone').effectHide=true;
$('orders_scx-frame-page3-txtinv_numb').disabled=true;
$('orders_scx-frame-page3-txtinv_numb').effectShow=true;
$('orders_scx-frame-page3-txtinv_numb').effectHide=true;
$('orders_scx-frame-page3-txtcost').disabled=true;
$('orders_scx-frame-page3-txtcost').effectShow=true;
$('orders_scx-frame-page3-txtcost').effectHide=true;
$('orders_scx-frame-page3-txttotal_frt').disabled=true;
$('orders_scx-frame-page3-txttotal_frt').effectShow=true;
$('orders_scx-frame-page3-txttotal_frt').effectHide=true;
$('orders_scx-frame-page3-txtprice').disabled=true;
$('orders_scx-frame-page3-txtprice').effectShow=true;
$('orders_scx-frame-page3-txtprice').effectHide=true;
$('orders_scx-frame-page3-txtminimum').disabled=true;
$('orders_scx-frame-page3-txtminimum').effectShow=true;
$('orders_scx-frame-page3-txtminimum').effectHide=true;
$('orders_scx-frame-page3-txtmaximum').disabled=true;
$('orders_scx-frame-page3-txtmaximum').effectShow=true;
$('orders_scx-frame-page3-txtmaximum').effectHide=true;
$('orders_scx-frame-page3-txton_order').disabled=true;
$('orders_scx-frame-page3-txton_order').effectShow=true;
$('orders_scx-frame-page3-txton_order').effectHide=true;
$('orders_scx-frame-page3-txtallocated').disabled=true;
$('orders_scx-frame-page3-txtallocated').effectShow=true;
$('orders_scx-frame-page3-txtallocated').effectHide=true;
$('orders_scx-frame-page3-txton_hand').disabled=true;
$('orders_scx-frame-page3-txton_hand').effectShow=true;
$('orders_scx-frame-page3-txton_hand').effectHide=true;
$('orders_scx-frame-page3-txtavailable').disabled=true;
$('orders_scx-frame-page3-txtavailable').effectShow=true;
$('orders_scx-frame-page3-txtavailable').effectHide=true;
$('orders_scx-frame-page3-lblisblanket').effectShow=true;
$('orders_scx-frame-page3-lblisblanket').effectHide=true;
$('orders_scx-frame-page3-lblcustomfile').effectShow=true;
$('orders_scx-frame-page3-lblcustomfile').effectHide=true;
$('orders_scx-frame-page3-tedlabel13').effectShow=true;
$('orders_scx-frame-page3-tedlabel13').effectHide=true;
$('orders_scx-frame-page3-tedlabel9').effectShow=true;
$('orders_scx-frame-page3-tedlabel9').effectHide=true;
$('orders_scx-frame-page3-tedlabel2').effectShow=true;
$('orders_scx-frame-page3-tedlabel2').effectHide=true;
$('orders_scx-frame-page3-tedlabel20').effectShow=true;
$('orders_scx-frame-page3-tedlabel20').effectHide=true;
$('orders_scx-frame-page3-tedlabel19').effectShow=true;
$('orders_scx-frame-page3-tedlabel19').effectHide=true;
$('orders_scx-frame-page3-tedlabel1').effectShow=true;
$('orders_scx-frame-page3-tedlabel1').effectHide=true;
$('orders_scx-frame-page3-tedlabel18').effectShow=true;
$('orders_scx-frame-page3-tedlabel18').effectHide=true;
$('orders_scx-frame-page3-tedlabel8').effectShow=true;
$('orders_scx-frame-page3-tedlabel8').effectHide=true;
$('orders_scx-frame-page3-tedlabel17').effectShow=true;
$('orders_scx-frame-page3-tedlabel17').effectHide=true;
$('orders_scx-frame-page3-tedlabel4').effectShow=true;
$('orders_scx-frame-page3-tedlabel4').effectHide=true;
$('orders_scx-frame-page3-tedlabel7').effectShow=true;
$('orders_scx-frame-page3-tedlabel7').effectHide=true;
$('orders_scx-frame-page3-tedlabel6').effectShow=true;
$('orders_scx-frame-page3-tedlabel6').effectHide=true;
$('orders_scx-frame-page3-tedlabel5').effectShow=true;
$('orders_scx-frame-page3-tedlabel5').effectHide=true;
$('orders_scx-frame-page3-chkclosed').disabled=true;
$('orders_scx-frame-page3-chkclosed_lbl').disabled=true;
$('orders_scx-frame-page3-chkclosed').effectShow=true;
$('orders_scx-frame-page3-chkclosed').effectHide=true;
$('orders_scx-frame-page3-tedlabel16').effectShow=true;
$('orders_scx-frame-page3-tedlabel16').effectHide=true;
$('orders_scx-frame-page3-tedlabel3').effectShow=true;
$('orders_scx-frame-page3-tedlabel3').effectHide=true;
$('orders_scx-frame-page3-errwhy_delete').effectShow=true;
$('orders_scx-frame-page3-errwhy_delete').effectHide=true;
$('orders_scx-frame-page3-txtdescript').disabled=true;
$('orders_scx-frame-page3-txtdescript').effectShow=true;
$('orders_scx-frame-page3-txtdescript').effectHide=true;
$('orders_scx-frame-page3-tedlabel10').effectShow=true;
$('orders_scx-frame-page3-tedlabel10').effectHide=true;
$('orders_scx-frame-page3-txtquantity').disabled=true;
$('orders_scx-frame-page3-txtquantity').effectShow=true;
$('orders_scx-frame-page3-txtquantity').effectHide=true;
$('orders_scx-frame-page3-errsalefactor').effectShow=true;
$('orders_scx-frame-page3-errsalefactor').effectHide=true;
$('orders_scx-frame-page3-errline_numb').effectShow=true;
$('orders_scx-frame-page3-errline_numb').effectHide=true;
$('orders_scx-frame-page3-txtline_numb').disabled=true;
$('orders_scx-frame-page3-txtline_numb').effectShow=true;
$('orders_scx-frame-page3-txtline_numb').effectHide=true;
$('orders_scx-frame-page3-tedlabel11').effectShow=true;
$('orders_scx-frame-page3-tedlabel11').effectHide=true;
$('orders_scx-frame-page3-txtcust_part').disabled=true;
$('orders_scx-frame-page3-txtcust_part').effectShow=true;
$('orders_scx-frame-page3-txtcust_part').effectHide=true;
$('orders_scx-frame-page3-tedlabel15').effectShow=true;
$('orders_scx-frame-page3-tedlabel15').effectHide=true;
$('orders_scx-frame-page3-tedlabel12').effectShow=true;
$('orders_scx-frame-page3-tedlabel12').effectHide=true;
$('orders_scx-frame-page3-ckisbroker').disabled=true;
$('orders_scx-frame-page3-ckisbroker_lbl').disabled=true;
$('orders_scx-frame-page3-ckisbroker').effectShow=true;
$('orders_scx-frame-page3-ckisbroker').effectHide=true;
$('orders_scx-frame-page3-edititem_notes').disabled=true;
$('orders_scx-frame-page3-edititem_notes').effectShow=true;
$('orders_scx-frame-page3-edititem_notes').effectHide=true;
$('orders_scx-frame-page3-errinv_numb').effectShow=true;
$('orders_scx-frame-page3-errinv_numb').effectHide=true;
$('orders_scx-frame-page3-errdescript').effectShow=true;
$('orders_scx-frame-page3-errdescript').effectHide=true;
$('orders_scx-frame-page3-errquantity').effectShow=true;
$('orders_scx-frame-page3-errquantity').effectHide=true;
$('orders_scx-frame-page3-errtotal_frt').effectShow=true;
$('orders_scx-frame-page3-errtotal_frt').effectHide=true;
$('orders_scx-frame-page3-errvendorpart').effectShow=true;
$('orders_scx-frame-page3-errvendorpart').effectHide=true;
$('orders_scx-frame-page3-errcost').effectShow=true;
$('orders_scx-frame-page3-errcost').effectHide=true;
$('orders_scx-frame-page3-errprice').effectShow=true;
$('orders_scx-frame-page3-errprice').effectHide=true;
$('orders_scx-frame-page3-findinv_numb').disabled=true;
$('orders_scx-frame-page3-findinv_numb').effectShow=true;
$('orders_scx-frame-page3-findinv_numb').effectHide=true;
$('orders_scx-frame-page3-findcust_part').disabled=true;
$('orders_scx-frame-page3-findcust_part').effectShow=true;
$('orders_scx-frame-page3-findcust_part').effectHide=true;
$('orders_scx-frame-page3-lblcomponents').effectShow=true;
$('orders_scx-frame-page3-lblcomponents').effectHide=true;
$('orders_scx-frame-page3-comboum').disabled=true;
$('orders_scx-frame-page3-comboum').selectedIndex=-1;
$('orders_scx-frame-page3-comboum').effectShow=true;
$('orders_scx-frame-page3-comboum').effectHide=true;
$('orders_scx-frame-page3-command1').effectShow=true;
$('orders_scx-frame-page3-command1').effectHide=true;
$('orders_scx-frame-page3-txtpack_unit').disabled=true;
$('orders_scx-frame-page3-txtpack_unit').effectShow=true;
$('orders_scx-frame-page3-txtpack_unit').effectHide=true;
$('orders_scx-frame-page3-tedlabel21').effectShow=true;
$('orders_scx-frame-page3-tedlabel21').effectHide=true;
$('orders_scx-frame-page3-txtextra_info').disabled=true;
$('orders_scx-frame-page3-txtextra_info').effectShow=true;
$('orders_scx-frame-page3-txtextra_info').effectHide=true;
$('orders_scx-frame-page3-tedlabel22').effectShow=true;
$('orders_scx-frame-page3-tedlabel22').effectHide=true;
$('orders_scx-frame-page3-txtdue_date').disabled=true;
$('orders_scx-frame-page3-txtdue_date').effectShow=true;
$('orders_scx-frame-page3-txtdue_date').effectHide=true;
$('orders_scx-frame-page3-tedlabel14').effectShow=true;
$('orders_scx-frame-page3-tedlabel14').effectHide=true;
$('orders_scx-frame-page3-txtrele_date').disabled=true;
$('orders_scx-frame-page3-txtrele_date').effectShow=true;
$('orders_scx-frame-page3-txtrele_date').effectHide=true;
$('orders_scx-frame-page3-tedlabel23').effectShow=true;
$('orders_scx-frame-page3-tedlabel23').effectHide=true;
$('orders_scx-frame-page3-txtremainder').disabled=true;
$('orders_scx-frame-page3-txtremainder').effectShow=true;
$('orders_scx-frame-page3-txtremainder').effectHide=true;
$('orders_scx-frame-page3-lblremainder').effectShow=true;
$('orders_scx-frame-page3-lblremainder').effectHide=true;
$('orders_scx-frame-page3-lblreqapproval').effectShow=true;
$('orders_scx-frame-page3-lblreqapproval').effectHide=true;
$('orders_scx-frame-page3-txtsalefactor').disabled=true;
$('orders_scx-frame-page3-txtsalefactor').effectShow=true;
$('orders_scx-frame-page3-txtsalefactor').effectHide=true;
$('orders_scx-frame-page3-tedlabel24').effectShow=true;
$('orders_scx-frame-page3-tedlabel24').effectHide=true;
$('orders_scx-frame-page3-errremainder').effectShow=true;
$('orders_scx-frame-page3-errremainder').effectHide=true;
$('orders_scx-frame-page3-txtshipped').disabled=true;
$('orders_scx-frame-page3-txtshipped').effectShow=true;
$('orders_scx-frame-page3-txtshipped').effectHide=true;
$('orders_scx-frame-page3-tedlabel26').effectShow=true;
$('orders_scx-frame-page3-tedlabel26').effectHide=true;
$('orders_scx-frame-page3-chkadd_frt').disabled=true;
$('orders_scx-frame-page3-chkadd_frt_lbl').disabled=true;
$('orders_scx-frame-page3-chkadd_frt').effectShow=true;
$('orders_scx-frame-page3-chkadd_frt').effectHide=true;
$('orders_scx-frame-page3-chkitemdeleted').disabled=true;
$('orders_scx-frame-page3-chkitemdeleted_lbl').disabled=true;
$('orders_scx-frame-page3-chkitemdeleted').effectShow=true;
$('orders_scx-frame-page3-chkitemdeleted').effectHide=true;
$('orders_scx-frame-page3-chkstockitem').disabled=true;
$('orders_scx-frame-page3-chkstockitem_lbl').disabled=true;
$('orders_scx-frame-page3-chkstockitem').effectShow=true;
$('orders_scx-frame-page3-chkstockitem').effectHide=true;
$('orders_scx-frame-page3-combotaxable').disabled=true;
$('orders_scx-frame-page3-combotaxable').selectedIndex=-1;
$('orders_scx-frame-page3-combotaxable').effectShow=true;
$('orders_scx-frame-page3-combotaxable').effectHide=true;
$('orders_scx-frame-page3-chkcuspartlock').disabled=true;
$('orders_scx-frame-page3-chkcuspartlock_lbl').disabled=true;
$('orders_scx-frame-page3-chkcuspartlock').effectShow=true;
$('orders_scx-frame-page3-chkcuspartlock').effectHide=true;
$('orders_scx-frame-page3-errrele_date').effectShow=true;
$('orders_scx-frame-page3-errrele_date').effectHide=true;
$('orders_scx-frame-page3-errdue_date').effectShow=true;
$('orders_scx-frame-page3-errdue_date').effectHide=true;
$('orders_scx-frame-page3-txtcostcoded').disabled=true;
$('orders_scx-frame-page3-txtcostcoded-displaytextbox').disabled=true;
$('orders_scx-frame-page3-txtcostcoded-displaytextbox').readOnly=true;
$('orders_scx-frame-page3-txtcostcoded-displaytextbox').effectShow=true;
$('orders_scx-frame-page3-txtcostcoded-displaytextbox').effectHide=true;
$('orders_scx-frame-page3-txtcostcoded').effectShow=true;
$('orders_scx-frame-page3-txtcostcoded').effectHide=true;
$('orders_scx-frame-page3').effectShow=true;
$('orders_scx-frame-page3').effectHide=true;
$('orders_scx-frame-page4').disabled=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel2').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel2').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel4').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel4').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-command1').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-command1').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel5').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel5').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-tedcommandbutton1').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-tedcommandbutton1').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-txtend_date').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-txtend_date').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-txtsearchdesc').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-txtsearchdesc').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-txtquotenumber').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-txtquotenumber').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel1').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-tedlabel1').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer-txtstart_date').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer-txtstart_date').effectHide=true;
$('orders_scx-frame-page4-importsearchcontainer').effectShow=true;
$('orders_scx-frame-page4-importsearchcontainer').effectHide=true;
$('orders_scx-frame-page4-command1').effectShow=true;
$('orders_scx-frame-page4-command1').effectHide=true;
(function(){
var dStart = new Date();
var grd = $('orders_scx-frame-page4-searchgrid');
if (grd){
Object.extend(grd, {oGrid: new AW.UI.Grid, oTable: new AW.XML.Table});
var oGrid = $('orders_scx-frame-page4-searchgrid').oGrid, oTable = $('orders_scx-frame-page4-searchgrid').oTable, oTempl;
oGrid.defineControlProperty('DataUpdate', false);
oGrid.defineCellProperty('CurrentControl', null);
oGrid.setSelectorWidth(10);
oGrid.getSelectorTemplate().setStyle('font-weight','bold');
oGrid.setRowCount(0);
oGrid.setCurrentColumn(-1);
oGrid.setCurrentRow(-1);
oGrid.setStyle('background-color','#EDEDED');
oGrid.clearColumnModel();
oGrid.setColumnCount(3);
oGrid.setStyle('font-family','Arial');
oGrid.setStyle('font-size','9pt');
oGrid.setHeaderHeight(19);
oGrid.setSize(undefined,144);
oGrid.setSelectorVisible(true);
oGrid.setScrollBars('vertical');
oGrid.setSize(384,undefined);
oGrid.setColumnIndices([0,1,2]);
oGrid.setColumnResizable(true,0);
oGrid.setColumnWidth(200+1,0);
oGrid.setHeaderText('Description',0);
oGrid.setColumnResizable(true,1);
oGrid.setColumnWidth(75+1,1);
oGrid.setHeaderText('Quote',1);
oGrid.setColumnResizable(true,2);
oGrid.setColumnWidth(75+1,2);
oGrid.setHeaderText('Date',2);


/* Column 0 'Column1' *//
oTempl = oGrid.getHeaderTemplate(0);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(0);
oTempl.setStyle('text-align','left');

/* Column 1 'Column2' *//
oTempl = oGrid.getHeaderTemplate(1);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
var fmt = new AW.Formats.Number;
fmt.setTextFormat('###');
oGrid.setCellFormat(fmt,1,undefined);
oTempl = oGrid.getCellTemplate(1);
oTempl.setStyle('text-align','right');

/* Column 2 'Column3' *//
oTempl = oGrid.getHeaderTemplate(2);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
var fmt = new AW.Formats.DateTimeVFP;
fmt.setDataTimezone(-14400000);
fmt.setTextTimezone(0);
fmt.setDataFormat('ISO8601');
fmt.setTextFormat('mm/dd/yy hh:mm:ss');
oGrid.setCellFormat(fmt,2,undefined);
oTempl = oGrid.getCellTemplate(2);
oTempl.setStyle('text-align','right');

oGrid.setSortDirection();
oGrid.refresh();
oGrid.defineRowProperty('tuRow', null);
oGrid.defineRowProperty('Clicked', false);
oGrid.onRowMouseDown = function(event, row){this.setRowClicked(true, row)};
oGrid.onRowMouseUp = function(event, row){this.setRowClicked(false, row)};
oGrid.onCurrentRowChanged = function(row){
var value = this.getRowProperty('tuRow', row);
if (!(this.disabled || value === null)){
if (!this.getRowClicked(row) && FoxInCloud.gridRowChangeDelay > 0){
if (this.nTO) window.clearTimeout(this.nTO);
this.nTO = FoxInCloud.gridMethod.bind(FoxInCloud).delay(FoxInCloud.gridRowChangeDelay, 'wAfterRowChange', $('orders_scx-frame-page4-searchgrid'), value);
}
else FoxInCloud.gridMethod('wAfterRowChange', $('orders_scx-frame-page4-searchgrid'), value);
}
this.setRowClicked(false, row);
};


oGrid.onCellValidating = function(text, col, row){
col = parseInt(col, 10);
var result, dynCC, template, readOnly, disabled;
if (typeof row === 'undefined') {
template = this.getCellTemplate(col);
}
else {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
template = this.getCellTemplate(col,row);
}
if (template.disabled) return;
if (typeof text === 'string'){
var fmt = this.getCellFormat(col, row);
var value = fmt ? fmt.textToValue(text) : text;
}
if (template.readOnly) return;
switch (col){
case 0: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-searchgrid'), value, 'orders_scx-frame-page4-searchgrid-column1-text1', true);break;}
case 1: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-searchgrid'), value, 'orders_scx-frame-page4-searchgrid-column2-text1', true);break;}
case 2: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-searchgrid'), value, 'orders_scx-frame-page4-searchgrid-column3-text1', true);break;}
}
var cols = this.getColumnCount(), rows = this.getRowCount(), done = false;
col++;
while (row < rows && !done) {
if (this.getCellEditable(col,row)) {
this.setSelectedColumns([col]);
this.setSelectedRows([row]);
this.setCurrentColumn(col);
this.setCurrentRow(row);
done = true;
}
else {
col++;
if (col >= cols){
col = 0;
row++;
}
}
}
return result;
};

oGrid.onKeyBackspace = function(event){
Event.extend(event).stop();
};

oGrid.setSelectedRows([-1]);
oGrid.setSelectedRows([-1]);
oGrid.setSelectedColumns([0]);
oGrid.disabled = true;
oGrid.setCurrentRow(-1);
oGrid.setCurrentColumn(0);
oGrid.disabled = false;
grd.update(oGrid);
}
dStart = new Date() - dStart;
window.console && console.log && console.log("'orders_scx-frame-page4-searchgrid' grid script took 78 ms to generate on the server, " + dStart + " ms to execute on the browser, total " + (dStart + 78) + " ms.\n" + '07/10/15 10:39:30 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_oxmlchanges() - 16 ms\n07/10/15 10:39:30 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_rs() - 0 ms\n07/10/15 10:39:30 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_events() - 47 ms\n07/10/15 10:39:30 AM - awhtml.fxp!Osearchgrid.gethtml_grd_aw_cscript_() - 62 ms');
})();
$('orders_scx-frame-page4-searchgrid').readOnly=true;
(function(){
var dStart = new Date();
var grd = $('orders_scx-frame-page4-detailgrid');
if (grd){
Object.extend(grd, {oGrid: new AW.UI.Grid, oTable: new AW.XML.Table});
var oGrid = $('orders_scx-frame-page4-detailgrid').oGrid, oTable = $('orders_scx-frame-page4-detailgrid').oTable, oTempl;
oGrid.defineControlProperty('DataUpdate', false);
oGrid.defineCellProperty('CurrentControl', null);
oGrid.setSelectorWidth(10);
oGrid.getSelectorTemplate().setStyle('font-weight','bold');
oGrid.setRowCount(0);
oGrid.setCellEditable(true);
oGrid.setCurrentColumn(-1);
oGrid.setCurrentRow(-1);
oGrid.setStyle('background-color','#EDEDED');
oGrid.clearColumnModel();
oGrid.setColumnCount(5);
oGrid.setStyle('font-family','Arial');
oGrid.setStyle('font-size','9pt');
oGrid.setHeaderHeight(19);
oGrid.setSize(undefined,144);
oGrid.setSelectorVisible(true);
oGrid.setScrollBars('vertical');
oGrid.setSize(577,undefined);
oGrid.setColumnIndices([0,1,2,3,4]);
oGrid.setColumnResizable(true,0);
oGrid.setColumnWidth(62+1,0);
oGrid.setHeaderText('Quantity',0);
oGrid.setColumnResizable(true,1);
oGrid.setColumnWidth(38+1,1);
oGrid.setHeaderText('UM',1);
oGrid.setColumnResizable(true,2);
oGrid.setColumnWidth(315+1,2);
oGrid.setHeaderText('Description',2);
oGrid.setColumnResizable(true,3);
oGrid.setColumnWidth(78+1,3);
oGrid.setHeaderText('Part',3);
oGrid.setColumnResizable(true,4);
oGrid.setColumnWidth(45+1,4);
oGrid.setHeaderText('Select',4);


/* Column 0 'Column1' *//
oTempl = oGrid.getHeaderTemplate(0);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
var fmt = new AW.Formats.Number;
fmt.setTextFormat('###');
oGrid.setCellFormat(fmt,0,undefined);
oTempl = oGrid.getCellTemplate(0);
oTempl.setStyle('text-align','right');

/* Column 1 'Column2' *//
oTempl = oGrid.getHeaderTemplate(1);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(1);
oTempl.setStyle('text-align','left');

/* Column 2 'Column3' *//
oTempl = oGrid.getHeaderTemplate(2);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(2);
oTempl.setStyle('text-align','left');

/* Column 3 'Column4' *//
oTempl = oGrid.getHeaderTemplate(3);
oTempl.setStyle('text-align','center');
/* -- Text1 (Textbox) -- *//
oTempl = oGrid.getCellTemplate(3);
oTempl.setStyle('text-align','left');

/* Column 4 'Column5' *//
/* -- Tedcheckbox1 (Checkbox) -- *//
oGrid.setCellTemplate(new AW.Templates.CheckBox,4,undefined);
oGrid.setCellFormat(new AW.Formats.Boolean,4,undefined);
oTempl = oGrid.getCellTemplate(4);
oTempl.setStyle('text-align','left');
oTempl.setStyle('text-align','center');
oTempl.setStyle('font-family','Verdana');

oGrid.setSortDirection();
oGrid.refresh();
oGrid.defineRowProperty('tuRow', null);
oGrid.defineRowProperty('Clicked', false);
oGrid.onRowMouseDown = function(event, row){this.setRowClicked(true, row)};
oGrid.onRowMouseUp = function(event, row){this.setRowClicked(false, row)};
oGrid.onCurrentRowChanged = function(row){
var value = this.getRowProperty('tuRow', row);
if (!(this.disabled || value === null)){
if (!this.getRowClicked(row) && FoxInCloud.gridRowChangeDelay > 0){
if (this.nTO) window.clearTimeout(this.nTO);
this.nTO = FoxInCloud.gridMethod.bind(FoxInCloud).delay(FoxInCloud.gridRowChangeDelay, 'wAfterRowChange', $('orders_scx-frame-page4-detailgrid'), value);
}
else FoxInCloud.gridMethod('wAfterRowChange', $('orders_scx-frame-page4-detailgrid'), value);
}
this.setRowClicked(false, row);
};


oGrid.onCellValidating = function(text, col, row){
col = parseInt(col, 10);
var result, dynCC, template, readOnly, disabled;
if (typeof row === 'undefined') {
template = this.getCellTemplate(col);
}
else {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
template = this.getCellTemplate(col,row);
}
if (template.disabled) return;
if (typeof text === 'string'){
var fmt = this.getCellFormat(col, row);
var value = fmt ? fmt.textToValue(text) : text;
}
if (template.readOnly) return;
switch (col){
case 0: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-detailgrid'), value, 'orders_scx-frame-page4-detailgrid-column1-text1', true);break;}
case 1: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-detailgrid'), value, 'orders_scx-frame-page4-detailgrid-column2-text1', true);break;}
case 2: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-detailgrid'), value, 'orders_scx-frame-page4-detailgrid-column3-text1', true);break;}
case 3: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-detailgrid'), value, 'orders_scx-frame-page4-detailgrid-column4-text1', true);break;}
case 4: if(!dynCC || dynCC === 'text1'){result = FoxInCloud.gridEditEvent('blur', $('orders_scx-frame-page4-detailgrid'), value, 'orders_scx-frame-page4-detailgrid-column5-text1', true);break;}
}
var cols = this.getColumnCount(), rows = this.getRowCount(), done = false;
col++;
while (row < rows && !done) {
if (this.getCellEditable(col,row)) {
this.setSelectedColumns([col]);
this.setSelectedRows([row]);
this.setCurrentColumn(col);
this.setCurrentRow(row);
done = true;
}
else {
col++;
if (col >= cols){
col = 0;
row++;
}
}
}
return result;
};
oGrid.onCellClicked = function(event, col, row){
col = parseInt(col, 10);
var result, dynCC, template, readOnly, disabled;
if (typeof row === 'undefined') {
template = this.getCellTemplate(col);
}
else {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
template = this.getCellTemplate(col,row);
}
if (template.disabled) return;
if (typeof text === 'string'){
var fmt = this.getCellFormat(col, row);
var value = fmt ? fmt.textToValue(text) : text;
}
event.cancelBubble = true;
event = Event.extend(event);
if(event.isLeftClick()){
switch (col){
case 4: if(!dynCC || dynCC === 'tedcheckbox1'){result = FoxInCloud.gridEditEvent(event, $('orders_scx-frame-page4-detailgrid'), this.getCellValue(col, row), 'orders_scx-frame-page4-detailgrid-column5-tedcheckbox1');break;}
}
return result;
}
};

oGrid.onKeyBackspace = function(event){
event = Event.extend(event);
if (!event.findElement('input')){
this.startCellEdit('');
event.stop();
}
};


oGrid.setSelectedRows([-1]);
oGrid.setSelectedRows([-1]);
oGrid.setSelectedColumns([0]);
oGrid.disabled = true;
oGrid.setCurrentRow(-1);
oGrid.setCurrentColumn(0);
oGrid.disabled = false;
grd.update(oGrid);
}
dStart = new Date() - dStart;
window.console && console.log && console.log("'orders_scx-frame-page4-detailgrid' grid script took 156 ms to generate on the server, " + dStart + " ms to execute on the browser, total " + (dStart + 156) + " ms.\n" + '07/10/15 10:39:30 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_oxmlchanges() - 15 ms\n07/10/15 10:39:30 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_rs() - 0 ms\n07/10/15 10:39:30 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_events() - 125 ms\n07/10/15 10:39:30 AM - awhtml.fxp!Odetailgrid.gethtml_grd_aw_cscript_() - 141 ms');
})();
$('orders_scx-frame-page4-commandfill').effectShow=true;
$('orders_scx-frame-page4-commandfill').effectHide=true;
$('orders_scx-frame-page4-txtline_numb').disabled=true;
$('orders_scx-frame-page4-txtline_numb').effectShow=true;
$('orders_scx-frame-page4-txtline_numb').effectHide=true;
$('orders_scx-frame-page4-tedlabel15').effectShow=true;
$('orders_scx-frame-page4-tedlabel15').effectHide=true;
$('orders_scx-frame-page4-errline_numb').effectShow=true;
$('orders_scx-frame-page4-errline_numb').effectHide=true;
$('orders_scx-frame-page4-chktaxable').disabled=true;
$('orders_scx-frame-page4-chktaxable_lbl').disabled=true;
$('orders_scx-frame-page4-chktaxable').effectShow=true;
$('orders_scx-frame-page4-chktaxable').effectHide=true;
$('orders_scx-frame-page4-lblimportok').effectShow=true;
$('orders_scx-frame-page4-lblimportok').effectHide=true;
$('orders_scx-frame-page4').effectShow=true;
$('orders_scx-frame-page4').effectHide=true;
$('orders_scx-frame-page1').lActivateSend=true;
$('orders_scx-frame-page2').lActivateSend=true;
$('orders_scx-frame-page3_tab').disabled=true;
$('orders_scx-frame-page3').lActivateSend=true;
$('orders_scx-frame-page4_tab').disabled=true;
$('orders_scx-frame-page4').lActivateSend=true;
FoxInCloud.pgfMake('orders_scx-frame', 'orders_scx-frame-page1', false, [,'orders_scx-frame-page3','orders_scx-frame-page4'], true, false, 0, 0);
$('orders_scx-frame').effectShow=true;
$('orders_scx-frame').effectHide=true;
$('orders_scx-command3').disabled=true;
$('orders_scx-command3').effectShow=true;
$('orders_scx-command3').effectHide=true;
$('orders_scx-errcust_numb').effectShow=true;
$('orders_scx-errcust_numb').effectHide=true;
$('orders_scx-txtcust_numb').effectShow=true;
$('orders_scx-txtcust_numb').effectHide=true;
$('orders_scx-lblsaveerror').effectShow=true;
$('orders_scx-lblsaveerror').effectHide=true;
FoxInCloud.documentInit('orders_scx');
$('orders_scx').effectShow=true;
$('orders_scx').effectHide=true;
$('orders_scx-frame-page1-orderframe').pageActivate('orders_scx-frame-page1-orderframe-page1');
$('orders_scx-frame').pageActivate('orders_scx-frame-page1');
/* -- Generated on 07/10/15 10:39:30 AM in 4.766 sec by FoxInCloud version 2.20 beta07 *//

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 10, 2015 @ 04:56am
Hmmm......Know it now! I assume you double-delimited the code so it appears correct. I did notice that in the reply, ww message board stripped the previous code. I am sure I used the original post, but I will rerun the tests.

- James


of course you're aware that this ww message board strips off textmerge delimiters ('< <' and '> >') and their content ...


Just tried, but does not work.

- James


can you try this code variant?

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
$('').update(obj); // new line
endtext


No, this did not work. Perhaps I put it in the wrong place. I put the code in the wcHTMLgen method of the grid. There is NOT a DoDefault(). Would some grid properties affect this code?

- James


Hi James,
can you try this code?
(should work initially, not sure it survives a grd.alias change)

procedure wcHTMLgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance && [.F.] {en} render container's inner HTML

local cScriptJS as String

text to cScriptJS textmerge noshow flag 1 pretext 3 && http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
var obj = $('').oGrid;
obj.onRowSelectedChanging = function(){return 1};
obj.onSelectedRowsChanging = function(){return 1};
obj.onCurrentRowChanging = function(){return 1};
endtext

m.toHTMLgen.cScriptJSadd_(m.cScriptJS) && && {en} Adds JavaScript instructions after form's script



I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James





Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 10, 2015 @ 05:54am
Hmmm......Know it now! I assume you double-delimited the code so it appears correct. I did notice that in the reply, ww message board stripped the previous code. I am sure I used the original post, but I will rerun the tests.

- James

OK we'll test that on our side and hopefully get back with a generic solution


-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 12, 2015 @ 11:27pm
Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("<<Iif(m.lFreeze , 'none', 'single-row')>>");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James


-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 21, 2015 @ 08:41am
Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James


Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 21, 2015 @ 08:50am
the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James




-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 22, 2015 @ 04:18am
You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James





Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 28, 2015 @ 10:17pm
Hi James,

http://foxincloud.com/how-to.php?howto=aztuto1 should answer most of your questions ...


You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James





-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 29, 2015 @ 04:50am
After reading back through this thread, I believe I explained my problem very poorly. Allow me to try again with more brevity.

Trial 1
1 - A grid on a form set to .Enabled = .F. at design time.
2 - Set .Enabled = .T. programmatically after form has been displayed.
3 - Browser will NOT send row change to server.
Operation is as expected in LAN.

Trial 2
1 - Same grid on a form set to .Enabled = .T. at design time.
2 - Browser will send row change to server - as expected.
3 - Set .Enabled = .F. programmatically.
4 - Browser will NOT send row change to server - as expected.
5 - Set .Enabled = .T. programmatically.
6 - Browser will send row change to server - as expected.
7 - Proper operation continues...
Operation is as expected in LAN.

This is a screen grab of a test:

In the test I am using my FIC generated classes. The graphic illustrates Trial 1. As you can see, the row has been moved, but the display has not been updated as a row change event was never sent by the browser (observed w/firebug).

If I return to VFP and change the grid to .Enabled = .T. at design time, operation is as expected, and row change events are observed in firebug.

I have made many iterations and currently have this test operating with the minimum of non-default properties (left, top, width...). The grid has a single statement in .wAfterRowChange which is a .Parent.Refresh(). All FAA added code is still in place. No other grid methods used.

Buttons have single line code setting grid.enabled to the proper value in .Click. All FAA added code is still in place. No other methods used.

I cannot find anything in my base classes that would cause this behavior. In the misunderstanding, I do not really want to "lock" the grid. I simply need .Enabled to function.

If I can get some time later, I will create a new project and from VFP base classes create this test case with a FAA analysis. I will use this to see if my subclasses are the problem. Any other ideas?

Thanks - James


Hi James,

http://foxincloud.com/how-to.php?howto=aztuto1 should answer most of your questions ...


You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James






Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  GLS
  James Patterson
  Jul 29, 2015 @ 07:51am
Hi James,

I choose to use AllowCellSelection instead of enabled in a grid.
With grid.AllowCellSelection = .F., the user cannot modify anything in the grid and in web mode, wAfterRowChange() is send to the fic server.

Regards
Gilles


After reading back through this thread, I believe I explained my problem very poorly. Allow me to try again with more brevity.

Trial 1
1 - A grid on a form set to .Enabled = .F. at design time.
2 - Set .Enabled = .T. programmatically after form has been displayed.
3 - Browser will NOT send row change to server.
Operation is as expected in LAN.

Trial 2
1 - Same grid on a form set to .Enabled = .T. at design time.
2 - Browser will send row change to server - as expected.
3 - Set .Enabled = .F. programmatically.
4 - Browser will NOT send row change to server - as expected.
5 - Set .Enabled = .T. programmatically.
6 - Browser will send row change to server - as expected.
7 - Proper operation continues...
Operation is as expected in LAN.

This is a screen grab of a test:

In the test I am using my FIC generated classes. The graphic illustrates Trial 1. As you can see, the row has been moved, but the display has not been updated as a row change event was never sent by the browser (observed w/firebug).

If I return to VFP and change the grid to .Enabled = .T. at design time, operation is as expected, and row change events are observed in firebug.

I have made many iterations and currently have this test operating with the minimum of non-default properties (left, top, width...). The grid has a single statement in .wAfterRowChange which is a .Parent.Refresh(). All FAA added code is still in place. No other grid methods used.

Buttons have single line code setting grid.enabled to the proper value in .Click. All FAA added code is still in place. No other methods used.

I cannot find anything in my base classes that would cause this behavior. In the misunderstanding, I do not really want to "lock" the grid. I simply need .Enabled to function.

If I can get some time later, I will create a new project and from VFP base classes create this test case with a FAA analysis. I will use this to see if my subclasses are the problem. Any other ideas?

Thanks - James


Hi James,

http://foxincloud.com/how-to.php?howto=aztuto1 should answer most of your questions ...


You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James





Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  LLS
  Jul 29, 2015 @ 08:22am
Yes, the user cannot modify the contents and it does give a good presentation like a listbox. The advantage of .Enabled is it prevents the user from moving the currently selected row. FIC behaves just like VFP with respect to .Enabled, with the previously listed exception...

Thanks - James


Hi James,

I choose to use AllowCellSelection instead of enabled in a grid.
With grid.AllowCellSelection = .F., the user cannot modify anything in the grid and in web mode, wAfterRowChange() is send to the fic server.

Regards
Gilles


After reading back through this thread, I believe I explained my problem very poorly. Allow me to try again with more brevity.

Trial 1
1 - A grid on a form set to .Enabled = .F. at design time.
2 - Set .Enabled = .T. programmatically after form has been displayed.
3 - Browser will NOT send row change to server.
Operation is as expected in LAN.

Trial 2
1 - Same grid on a form set to .Enabled = .T. at design time.
2 - Browser will send row change to server - as expected.
3 - Set .Enabled = .F. programmatically.
4 - Browser will NOT send row change to server - as expected.
5 - Set .Enabled = .T. programmatically.
6 - Browser will send row change to server - as expected.
7 - Proper operation continues...
Operation is as expected in LAN.

This is a screen grab of a test:

In the test I am using my FIC generated classes. The graphic illustrates Trial 1. As you can see, the row has been moved, but the display has not been updated as a row change event was never sent by the browser (observed w/firebug).

If I return to VFP and change the grid to .Enabled = .T. at design time, operation is as expected, and row change events are observed in firebug.

I have made many iterations and currently have this test operating with the minimum of non-default properties (left, top, width...). The grid has a single statement in .wAfterRowChange which is a .Parent.Refresh(). All FAA added code is still in place. No other grid methods used.

Buttons have single line code setting grid.enabled to the proper value in .Click. All FAA added code is still in place. No other methods used.

I cannot find anything in my base classes that would cause this behavior. In the misunderstanding, I do not really want to "lock" the grid. I simply need .Enabled to function.

If I can get some time later, I will create a new project and from VFP base classes create this test case with a FAA analysis. I will use this to see if my subclasses are the problem. Any other ideas?

Thanks - James


Hi James,

http://foxincloud.com/how-to.php?howto=aztuto1 should answer most of your questions ...


You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James







Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  FoxInCloud Support - Thierry N.
  James Patterson
  Jul 30, 2015 @ 09:12pm
OK James,

So far !Grid.Enabled behaves differently in Web mode and desktop mode.

http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx demonstrates we found a way to handle 'row freezing' using JavaScript in ActiveWidget - looks like just a first step in your mind.

We'll implement this feature in one of the next releases after 2.20 released today or tomorrow.

Thanks for your patience


After reading back through this thread, I believe I explained my problem very poorly. Allow me to try again with more brevity.

Trial 1
1 - A grid on a form set to .Enabled = .F. at design time.
2 - Set .Enabled = .T. programmatically after form has been displayed.
3 - Browser will NOT send row change to server.
Operation is as expected in LAN.

Trial 2
1 - Same grid on a form set to .Enabled = .T. at design time.
2 - Browser will send row change to server - as expected.
3 - Set .Enabled = .F. programmatically.
4 - Browser will NOT send row change to server - as expected.
5 - Set .Enabled = .T. programmatically.
6 - Browser will send row change to server - as expected.
7 - Proper operation continues...
Operation is as expected in LAN.

This is a screen grab of a test:

In the test I am using my FIC generated classes. The graphic illustrates Trial 1. As you can see, the row has been moved, but the display has not been updated as a row change event was never sent by the browser (observed w/firebug).

If I return to VFP and change the grid to .Enabled = .T. at design time, operation is as expected, and row change events are observed in firebug.

I have made many iterations and currently have this test operating with the minimum of non-default properties (left, top, width...). The grid has a single statement in .wAfterRowChange which is a .Parent.Refresh(). All FAA added code is still in place. No other grid methods used.

Buttons have single line code setting grid.enabled to the proper value in .Click. All FAA added code is still in place. No other methods used.

I cannot find anything in my base classes that would cause this behavior. In the misunderstanding, I do not really want to "lock" the grid. I simply need .Enabled to function.

If I can get some time later, I will create a new project and from VFP base classes create this test case with a FAA analysis. I will use this to see if my subclasses are the problem. Any other ideas?

Thanks - James


Hi James,

http://foxincloud.com/how-to.php?howto=aztuto1 should answer most of your questions ...


You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James






-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Grid Current Record Display
  n/a
  Thierry Nivelet (FoxInCloud)
  Jul 31, 2015 @ 03:34am
No problem, I've kept thinking I created the behavior. Already worked around it.

- James


OK James,

So far !Grid.Enabled behaves differently in Web mode and desktop mode.

http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx demonstrates we found a way to handle 'row freezing' using JavaScript in ActiveWidget - looks like just a first step in your mind.

We'll implement this feature in one of the next releases after 2.20 released today or tomorrow.

Thanks for your patience


After reading back through this thread, I believe I explained my problem very poorly. Allow me to try again with more brevity.

Trial 1
1 - A grid on a form set to .Enabled = .F. at design time.
2 - Set .Enabled = .T. programmatically after form has been displayed.
3 - Browser will NOT send row change to server.
Operation is as expected in LAN.

Trial 2
1 - Same grid on a form set to .Enabled = .T. at design time.
2 - Browser will send row change to server - as expected.
3 - Set .Enabled = .F. programmatically.
4 - Browser will NOT send row change to server - as expected.
5 - Set .Enabled = .T. programmatically.
6 - Browser will send row change to server - as expected.
7 - Proper operation continues...
Operation is as expected in LAN.

This is a screen grab of a test:

In the test I am using my FIC generated classes. The graphic illustrates Trial 1. As you can see, the row has been moved, but the display has not been updated as a row change event was never sent by the browser (observed w/firebug).

If I return to VFP and change the grid to .Enabled = .T. at design time, operation is as expected, and row change events are observed in firebug.

I have made many iterations and currently have this test operating with the minimum of non-default properties (left, top, width...). The grid has a single statement in .wAfterRowChange which is a .Parent.Refresh(). All FAA added code is still in place. No other grid methods used.

Buttons have single line code setting grid.enabled to the proper value in .Click. All FAA added code is still in place. No other methods used.

I cannot find anything in my base classes that would cause this behavior. In the misunderstanding, I do not really want to "lock" the grid. I simply need .Enabled to function.

If I can get some time later, I will create a new project and from VFP base classes create this test case with a FAA analysis. I will use this to see if my subclasses are the problem. Any other ideas?

Thanks - James


Hi James,

http://foxincloud.com/how-to.php?howto=aztuto1 should answer most of your questions ...


You are in University, I am in Kindergarten. Let me backup a bit and make sure I understand what FIC is doing.

Each object on a form is responsible for generating, or at least contributing to the generation of it's own HTML and JS with a call to .wcHTMLgen.

Something in FIC is responsible for stepping through each object and calling that object's .wcHTMLgen, which it collects and merges into HTML and JS documents that are then sent to the browser.

Let's push on. The toHTMLgen object passed as a parameter to .wcHTMLgen will LATER be used by FIC to generate the actual HTML and JS. Calling .wcHTMLgen gives us a convenient place to modify/add/? the HTML and JS generation process. This is accomplished by modifying the toHTMLgen object with things like toHTMLgen.cScriptJSadd() to add JS to the FIC generated JS. The toHTMLgen object is primarily a storage location for all the information FIC will need later to create HTML and JS. I am a bit fuzzy about this.wcHTML. If it were toHTMLgen.wcHTML I would think this is the storage point in the object for new or custom HTML, but it isn't and I do not see a return point for this.wcHTML. I know it must work, I just do not understand how.

OK, in the example, you subclassed awHTMLgen into tutoHTMLgen. You did this to add the method getHTML_grd_AW_cScript_Events(). cawHTMLGenClass is a hook that allows overriding the awHTMLgen class with a custom HTML generation class. Is this only at the Form level?

How is .getHTML_grd_AW_cScript_Events() called in the example? I am mainly interested in the parameters passed. Also the DoDefault(@m.result, m.oJS, m.lRequest) is troubling me as I cannot determine what it is calling as a default. VFP is not my primary language and it takes some time for me to regain some competence in it. Sometimes I can't see the OOP for the trees!

Basic I know, but correct me anywhere I am wrong. I need to understand this as I need to push it down to a more lower level, like per grid.

Thanks - James


the necessary code is in VFP

what you need to do in xxxServer.prg:
- redefine your awHTMLgen class in xxxServer
- create you awHTMLgen sub-class as explained


Thierry,

Just now back on the project and I am a bit confused by this addition. I have gone to ..tutotest.. and the freeze check box example works just as I need. I don't quite follow the solution. I am mainly interested in programmatic interaction, but this seems to use chkFreeze hard-coded to effect a change in JS - correct? Since I am interested in replicating VFP grid .Enabled behavior, do I need to intercept .Enabled calls and add this JS?

Thanks - James


Hi James,

Solution implemented here: http://foxincloud.com/tutotest/wFormStandardPage.tuto?awForm=report.scx
(F5 to reload CSS)

code is as follows:

MODIFY COMMAND Home(1) + "\tools\ab\aw\samples\fic\fictuto\progs\tutoserver.prg" AS 1252

&& in tutoServer class:

cawHTMLGenClass = 'tutoHTMLgen' && tutoHTMLgen AS awHTMLgen OF awHTML.fxp && awHTMLgen

&& added at the end of the program:

* ================================================================================
DEFINE CLASS tutoHTMLgen AS awHTMLgen OF awHTML.prg
* ================================================================================

* ------------------------------------------------------------
protected procedure getHTML_grd_AW_cScript_Events && {en} Grid events script {fr} Script des événements d'un grille
lparameters ;
result; && @ {en} cumulative result from sub methods {fr} résultat cumulatif
, oJS as Empty; && @ {en} result Script snippets {fr} Fragments de Script résultat
, lRequest as Boolean; && {en} XML data need a reload {fr} Les données XML doivent être (re)chargées

local success as Boolean;
, lFreeze as Boolean;

success = DoDefault(@m.result, m.oJS, m.lRequest)

if m.success and m.this.cObjID == 'report_scx-grdorders'

lFreeze = Cast(m.this.oControl.Parent.chkFreeze.value as L)

text to m.oJS.currentColRow additive textmerge noshow flags 1 pretext 3 && a href="http://www.activewidgets.com/javascript.forum.22070.4/cancel-row-clicks-and-changes.html
oGrid.setSelectionMode("");

endtext
endif

return m.success
endproc

* ================================================================================
ENDDEFINE && CLASS tutoHTMLgen
* ================================================================================

You need a FAS source code update to implement a similar feature - you'll receive a d/l link soon.

FAS source code update will include the above test case.


I recently needed a work around for a grid where I did not want the user to select a different row in the grid. For various reasons, setting Enabled to .F. did not function as I needed. To code around this, I simply intercept the record move in wAfterRowChange. If a test indicates the row should not be changed, I set the record pointer BACK to the required record programmatically. This works fine in LAN with not even a "flash" in the grid as the change is made and returned to the original position.

In Web, the record pointer is indeed returned correctly. The problem is the grid display is not updated back to the record. Refresh() does not work. Would making this change visible require a complete regeneration of the grid? Can I send a command that will allow the grid display to resync with the data? This is not affecting the integrity of the data, it is just that users are easily confused by a small inconsistencies in the UI. I find I spend about 80% of my time on presentation and error proofing! Ideas?

Thanks - James






© 1996-2024