Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ReportView Control Sub Item Array Edit
;;;;;;;;;;;;;;;;;;;;;;; ;; Demonstrates simple RV control sub item editing technique. InitDialogConstants() aSample = ArrayFromStr("1abcdefghijklmnopqrstuvwxyz") ArrayRedim(aSample, -1, 2) aSample[0,0] = "Letter" aSample[0,1] = "Number" For i = 1 To ArrInfo(aSample, 1) - 1 aSample[i, 1] = i Next #DefineSubRoutine EditCallbackProc(Edit_Handle,Edit_Message,Edit_Name,Edit_EventInfo,Edit_ChangeInfo) Switch Edit_Message Case MSG_INIT DialogProcOptions(Edit_Handle,MSG_RVITEMSELROW,@TRUE) Return(RET_DO_DEFAULT) Case MSG_RVITEMSELROW ; "ReportView_1" ; Gets a One or two dimension array containing all REPORTVIEW rows which have first column text matching one of the items specified ; as a tab delimited list in the functions fourth parameter (request-value) . aTarget = DialogControlGet(Edit_Handle, "ReportView_1", DC_RVMATCHCOL, Edit_ChangeInfo) ; Remove row from REPORTVIEW control. Use the function's set-info (fourth) parameter to indicate the first column text of the row to remove. ; The text can be a delimited list to indicate which row to remove when multiple rows have the same first column text. DialogControlSet(Edit_Handle, "ReportView_1", DC_ITEMBOXREMOVE, Edit_ChangeInfo) ; Modify data in the aTarget[0,1] = "Selected" ; Add row to REPORTVIEW control. The functions function's set-info (fourth) parameter can be an array or delimited list. If the delimited list lacks ; enough items or the array enough columns the remaining columns of the control will be left empty. If either the list or array has too many items or ; columns, the extra text will be ignored. If an array parameter contains multiple rows, all array rows will be added to the control. Supports variant safe arrays. DialogControlSet(Edit_Handle, "ReportView_1", DC_ITEMBOXADD, aTarget) Return(RET_DO_DEFAULT) EndSwitch Return(RET_DO_DEFAULT) #EndSubRoutine ColEditFormat=`WWWDLGED,6.2` ColEditCaption=`Simple Column Editing` ColEditX=882 ColEditY=085 ColEditWidth=302 ColEditHeight=206 ColEditNumControls=002 ColEditProcedure=`EditCallbackProc` ColEditFont=`DEFAULT` ColEditTextColor=`DEFAULT` ColEditBackground=`DEFAULT,DEFAULT` ColEditConfig=0 ColEdit001=`124,186,033,011,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,10,32,DEFAULT,DEFAULT,DEFAULT` ColEdit002=`006,007,282,171,REPORTVIEW,"ReportView_1",aSample,DEFAULT,DEFAULT,20,32505856,DEFAULT,DEFAULT,DEFAULT` ButtonPushed=Dialog("ColEdit")EXIT
Article ID: W17757
Filename: ReportView Control Sub Item Edit.txt
File Created: 2014:04:11:09:24:04
Last Updated: 2014:04:11:09:24:04