(cont'd from this thread because Markdown Editor chokes on long posts, especially when a large amount of code has been posted earlier in the thread)
Hi Tuvia,
here is the first breakpoint you may want to try:
&& modify command awHTML > method getHTML_grd_AW_cScript_aHandlerObj
&& when generating form's HTML, your program should arrive here
assert !(m.toObj.BaseClass == 'Textbox' and m.lcEvent == 'valid') && add this line
llEvent = m.loSupport.lEvent(m.toObj.BaseClass,, m.lcEvent,, @m.llEvent) AND m.llEvent && {fr} awSupport travaille dans une autre session de données
if m.llEvent
* {en} if m.toObj.BaseClass == 'Textbox' and m.lcEvent == 'valid', execution should come here
* {en} for debug please be patient and step into each called method until you are sure that toObj.event() method gets executed and returns .T.
* {en} depending on your version, it occurs on either of these lines:
&& luResult = Evaluate('m.toControl.' + m.tcEvent + '()')
* {en} or
&& luResult = &luResult
* ==================================================
luEvent = this.uEvent(m.toObj, m.lcEvent) && {en} polls the object.event() method for implementation based on the RETURNed value
* ==================================================
I found that the grid when created is not substituting the FiC textbox class for the standard VFP base class. Since there is no .woHTMLgen property, it fails.
Adding a fic textbox cannot be done menually, VFP will not lwt you add it to a grid. I will try and see where the switch occurs.
Update: I did a workaround by specifying the number of columns in the grid, then doing a USE FORMNAME.SCX, then replacing each instance of the grd textbox with xxxtxt.
OK got it, you need to remove/add textbox in gri.init()
see sample code in FoxInCloud live tutorial,data update
Is this a new thing? I never did that in the past.
Required as long as you need cell-level events; always been so because even changing grid.ClassMember
to a custom column class does not change .Text1.class
Hmmm. I never did it before and my grids worked fine. I never use cell level events, but still I wonder why it always worked.
just double checked on another application: FAA changed Text1.class
to xxxTxt
Usually my grids in the past did not come thru FAA. After FAA crated xxx.vcx, I use the xxxgrd from xxx.vcx. So not sure how I got into this problem.
This is an issue I wonder if can be addressed. I always added grids from xxx.vcx. Previously I could add a grid, set a recordsource in .Load, update it in .Init, and not have to manually set each column's properties. 10 fields, the grid makes 10 columns, just like in VFP.
So now I have to either programmatically or at design time set a lot of column info I never had to do before. I now need names of each field/datasource, etc, in order to bind a table to the grid.
Update: this cannot be done at design time, xxxtxt cannot be added to a grid at design time.
Hi Tuvia,
I assure you, I always added my text objects in a grid in "Design" mode You must select the xxx class library in the tools, delete the current text object from the grid column, and then drag and drop the xxxTxt object into the grid column.
Regards Gilles
Adding a xxtxt or xxxcbo at design time always gives me "cannot add this object to a grid." I select a column then try and drag the new control into it and get that error. Obviously I am doing something wrong.
I do not really want to add to the grid load time. Grids were an integral part of my VFP style, but they are a nightmare on the web. By nightmare I do not mean they do not work, but that there is no way to bind a grid to data and be able to enter a value and move row to row without a significsnt lag. I worked with Thierry, and we were able to get it down to 2 seconds for a row change, but that makes data entry impractical. I have tried everything and have not yet come up with an alternative.
you can easily do it at runtime; see FoxInCloud Live Tutorial > Data Update
procedure grd.Init
FOR iGrc = 1 TO .ColumnCount
with .Columns(m.iGrc) as Column
…
.RemoveObject('Text1')
.AddObject('ficTxt', ICase(;
m.iGrc = column_region,;
'ficCbo',; && of ficSample.vcx as Combobox
m.iGrc = column_readOnly,;
'ficTxtGrc',; && of ficSample.vcx as Textbox
m.iGrc = column_active,;
'ficChk',;
'ficTxt'; && of ficSample.vcx as Textbox
))
Is there a significant performance hit adding them at runtime?