Does anyone have any good examples illustrating how WC5 has been combined in a successful and elegant way? I had tried to set up a traditional WC web form where I set up my own DIV tags to split the page with a wwWebDataGrid to illustrate results on the right side of the page, driven by a panel of different analytical conditions on the left.
Problem is each analytical method requires a different grid matrix design on the right hand side; I tried to manipulate the matrix programatically but it did not seem to hold; removing and adding columns seemed to lose the reference and the like, so, I thought that using framesets would be better.
I understand that using Frames and Framesets have been taboo; does anyone have any other recomendations? I've been messing with toggling the grid visible or not, but I can't seem to alter to grid characteristics on the fly. The Grid's load properly and the right data is always presented, however, can't modify the nature of the table...
For example, I have tried to modify the grid headers on the fly, depending on the new data cursor, but, whatever modifications I have tried tend to fail; does anyone see what I am doing wrong here in terms of altering Grid Characteristics on the fly; I figure that you should be able to modify this without to much difficulty but my grid references appear to be pooched...
Some Code below;
***************************************************************** Define Class DefaultHome_Page As WWC_WEBPAGE Of WWC_WEBPAGE_FILE ***************************************************************** *** Your Implementation Page Class - put your code here *** This class acts as base class to the generated page below ***************************************************************** #If .F. *** This line provides Intellisense: Ensure your path includes this page's location Local This As DefaultHome_Page_WCSX Of DefaultHome_Page.prg #Endif EnableSessionState = .T. oUser = Null nId = 0 nAccessLevel = 0 txtLabel = "Marketing Database" ImageURL = "images/DefaultHome.jpg" lc_FileToUse = "" ***************************************************************** * OnLoad **************************************** Function OnLoad() This.Page.EnableSessionState = .T. This.oUser = Createobject("ClientName_Dataclass") this.txtBottomGreeting.text = this.txt1 this.ddl_clientsegments.change() *Just a default table to present some information when the user hits the page IF this.IsPostBack else SELECT * FROM addbs(Config.cDataPath)+"StoreID" INTO CURSOR GridData endif Endfunc FUNCTION ddlClientSegments_change() DO case *Dealing with Segment Profiles CASE VAL(this.ddl_clientsegments.SelectedValue) = 1 this.txtLabel="Segment Profiles" this.wwParmDropDownList.unbinddata() SELECT * FROM addbs(Config.cDataPath)+"SegmentProfiles\SegDesc.dbf" INTO CURSOR SegParms USE IN SegDesc this.wwParmDropDownList.DataSource = [SegParms] this.wwParmDropDownList.FirstItemText = "* Select Segment *" this.wwParmDropDownList.FirstItemValue = "0" this.wwParmDropDownList.DataTextField = "Description" this.wwParmDropDownList.DataValueField = "Segment" this.wwParmDropDownList.databind() this.lbl_parms.text="Segments" CASE VAL(this.ddl_clientsegments.SelectedValue) = 2 this.txtLabel="Segment Profile Distributions" *... ETC ENDCASE ENDFUNC FUNCTION ParmDropDown_Change() this.grdMainDataGrid.unbinddata() lc_FileToUse = addbs(Config.cDataPath)+"SegmentProfiles\meansprofiles14_segmnt" + this.wwParmDropDownList.SelectedValue SELECT *, RECNO() as seqno FROM &lc_FileToUse INTO CURSOR GridData ENDFUNC FUNCTION OnPreRender() this.RenderGrid() ENDFUNC FUNCTION RenderGrid() this.grdMainDataGrid.DataSource = [GridData] SELECT GridData *Here is a sample of how I was hoping to modify headers, etc. Applies when a certain table occurs, otherwise defaults to field name. loCol = this.grdMAINDATAGRID.COLUMNS.item("wwWebDataGridColumn_3") IF FSIZE("Catogory") <> 0 loCol.HeaderText = "Description of Attributes" ELSE STORE FIELD(3) TO lc_fieldname loCol.HeaderText = [lc_fieldname] ENDIF this.grdMainDataGrid.databind() ENDFUNC *etc... more code junk... Enddefine *# --- BEGIN GENERATED CODE BOUNDARY --- #*
thx
Serge