Have successfully loaded grid manually into cWebList, cWebPrompt and cWebGrid both using the examples provided, no problems reading from a csv file. All I want to do is allow the user to click on one, i.e. it's selected. Need to retrieve the value of what they selected. But I'm getting some weird behavior. The cWebList seems to show all fields except the first one selected and highlighted and never returns anything but row 0. You can't click on anything but the first entry, like it's all read-only. cWebGrid looks better, it's not all highlighted but you can't click on anything but the first row either. cWebPrompt is all highlighted again but you can double click on one of entries, problem is it doesn't behave the same way, can't figure out how to get the item selected into something I can use. I'll include some code here with cWebGrid, but just wondered, there must be an easier way to do this. I appreciate any help I can get. Tried all 3 because I don't care how this this gets done, as long as it's possible. What am I doing wrong or is this even possible? Thanks ahead of time.
Code:
Object oAsciiImportFromField is a cWebGrid
Set pbFillHeight to True
Set piMinHeight to 500
Set piWidth to 200
Set pbDataAware to False
Set pbOfflineEditing to True
Set pbColumnSortable to False
Set piSortColumn to 0
Set piColumnIndex to 0
Set piColumnSpan to 5
Object oFieldColumn is a cWebColumn
Set psCaption to "Field"
Set piWidth to 20
End_Object
Object oNameColumn is a cWebColumn
Set psCaption to "Name"
Set piWidth to 30
End_Object
Procedure OnManualLoadData tWebRow[] ByRef aTheRows String ByRef sCurrentRowID
Integer iNum
Forward Send OnManualLoadData (&aTheRows) (&sCurrentRowID)
Move 0 to iNum
Move iNum to aTheRows[iNum].sRowID
String sFilename lerror spath
WebGet piOpenFileName of ghoWebApp to sFileName
Get UploadFolder of ghoWebApp True to sPath
Move (sPath + "\" + sFileName) to sPath
Direct_Input channel 1 sPath
String ls3 lData
Repeat
Read channel 1 lData
If not (SeqEof) Begin
Move "Field " to ls3
Append ls3 iNum ":"
Move "Field" to aTheRows[iNum].sCssClassName
Move ls3 to aTheRows[iNum].aCells[0].sValue
Move ldata to aTheRows[iNum].aCells[1].sValue
Increment iNum
End
If ((not (SeqEof)) and (not (SeqEol))) Loop
Close_Input channel 1
End_Procedure
Procedure OnProcessDataSet tWebRow[] aData Integer sValue Integer iSelectedRowIndex
Send SaveDataToFile aData
Send ShowInfoBox aData " " eOperation " " iSelectedRowIndex
End_Procedure
End_Object