Attaching Lookup Table

For example, We have a table called Test that contains fields :

And we have another table called Users that contains fields :

In this case, field AssignedTo from table Test is a Foreign Key of UserID from table Users, as illustrated on the following diagram :

Field AssignedTo (from table Test) only contains Identity values (in form of numbers) which comes from UserID (which is autonumber field). Displaying this value in Grid is useless. We have to display the "FullName" to make it readable for users. In order to do this, we need to construct specific SQL query for table Test which also queries the value of "FullName" from table Users.

We can use :

SELECT Test.TestID,Test.CaseDesc,Test.TestResult,Test.Comment,Test.NeedToFix,Test.AssignedTo,
Users.FullName FROM Users INNER JOIN Test ON Users.UserID = Test.AssignedTo

Note that this SQL command is used on the server side page where WebGrid EXP get the (XML) data from the database. Here you can see the complete code (You can see this code on file : sampleGet4.asp) :


<%
Response.Buffer = True
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"

Class clsQuery
	
	Private sSQL
	Private sConnectString
	Private sPageSize
	Private sShowPage
	Private sOrderBy
	Private sOrderType
	Private arrExpression

	
	Public Property Let Expression(ByRef vVal)
		arrExpression = vVal
	End Property	

	Public Property Let SQL(ByRef vVal)
		sSQL = vVal
	End Property
	
	Public Property Let OrderBy(ByRef vVal)
		sOrderBy = vVal
	End Property	
	
	Public Property Let OrderType(ByRef vVal)
		if vVal = "" then 
			sOrderType = "ASC" 'default value
		else
			sOrderType = vVal
		end if		
	End Property
	
	Public Property Let ShowPage(ByRef vVal)
		if vVal = "" then 
			sShowPage = 1 'default value
		else
			sShowPage = CInt(vVal)
		end if
	End Property
	
	Public Property Let PageSize(ByRef vVal)
		if vVal = "" then 
			sPageSize = 10 'default value
		else
			sPageSize = CInt(vVal)
		end if
	End Property
	
	Public Property Let ConnectString(ByRef vVal)
		sConnectString = vVal
	End Property

	Public Function GetPage()
		
		sNewOrderBy = ""
		
		If sOrderBy <> "" Then
		
			Dim Item
			NumOfExps = 0
			if not IsEmpty(arrExpression) then
				For Each Item In arrExpression
					NumOfExps = NumOfExps + 1
				Next
			end if

			if NumOfExps>0 then
				For i = 0 to CInt(NumOfExps)-1
						sAlias = arrExpression(i)(0)
						sExp = arrExpression(i)(1)
						sNewOrderBy = replace(sOrderBy,sAlias,sExp)
				Next
				sSQL = sSQL & " Order By " & sNewOrderBy & " " & sOrderType
			else
				sSQL = sSQL & " Order By " & sOrderBy & " " & sOrderType
			end if

		End If	

		Dim rs
		Set rs = server.CreateObject("ADODB.Recordset") 
		rs.CursorLocation = 3
		rs.Open sSQL, sConnectString, 3, 1, &H0001

		Dim oXMLDOM
		set oXMLDOM = Server.CreateObject("MSXML.DOMDocument")	
		set oXMLDOM.documentElement = oXMLDOM.createElement("result")
		
		Dim root
		set root = oXMLDOM.documentElement		
		
		set oNode = oXMLDOM.createElement("Original")
		set oOriginal = root.appendChild(oNode)
		
		set oNode = oXMLDOM.createElement("PageProperty")'
		set oPageProperty = root.appendChild(oNode)
		
		If rs.RecordCount = 0 Then
			
			set oNode = oXMLDOM.createElement("ShowPage")'
			oNode.text = sShowPage
			oPageProperty.appendChild oNode  
				
			set oNode = oXMLDOM.createElement("PageSize")'
			oNode.text = sPageSize
			oPageProperty.appendChild oNode  		
				
			set oNode = oXMLDOM.createElement("NumOfPages")'
			oNode.text = 0
			oPageProperty.appendChild oNode  
				
			set oNode = oXMLDOM.createElement("OrderBy")'
			oNode.text = sOrderBy
			oPageProperty.appendChild oNode  	
				
			set oNode = oXMLDOM.createElement("OrderType")'
			oNode.text = sOrderType
			oPageProperty.appendChild oNode  			

			'GetPage = oXMLDOM.xml 
			set GetPage = oXMLDOM
				
			rs.Close
			Set rs = Nothing		
			Exit Function
		End If

		rs.PageSize = sPageSize
	    
		Dim NumOfPages
		NumOfPages = rs.PageCount
		If sShowPage < 1 then
			sShowPage = 1
		ElseIf sShowPage > NumOfPages Then
			sShowPage = NumOfPages
		End If
		rs.AbsolutePage = sShowPage

		Dim i
		i = 0
		Dim Field
		Dim oNode

							
		Do Until rs.EOF Or i = sPageSize

			set oNode = oXMLDOM.createElement("Row")
			oOriginal.appendChild oNode
					
			For each Field in rs.Fields 

				

				set oNode = oXMLDOM.createElement(Field.Name)
				if Not LenB(rs(Field.Name).Value)=0  Then
					if Field.type = 7 then 'date
						oNode.text = FormatDateTime(rs(Field.Name).Value,0)'kalau tdk pakai Cstr,format date bisa berubah
					else
						oNode.text = Cstr(rs(Field.Name).Value)'kalau tdk pakai Cstr,format date bisa berubah, toString
					end if					
					
				end if
				oOriginal.lastChild.appendChild oNode 
			Next
	        
			rs.MoveNext
			i = i + 1
		Loop
			
		set oNode = oXMLDOM.createElement("ShowPage")'
		oNode.text = sShowPage
		oPageProperty.appendChild oNode  
			
		set oNode = oXMLDOM.createElement("PageSize")'
		oNode.text = sPageSize
		oPageProperty.appendChild oNode  		
			
		set oNode = oXMLDOM.createElement("NumOfPages")'
		oNode.text = NumOfPages
		oPageProperty.appendChild oNode  
			
		set oNode = oXMLDOM.createElement("OrderBy")'
		oNode.text = sOrderBy
		oPageProperty.appendChild oNode  	
			
		set oNode = oXMLDOM.createElement("OrderType")'
		oNode.text = sOrderType
		oPageProperty.appendChild oNode  			

		'GetPage = oXMLDOM.xml 
		set GetPage = oXMLDOM

		rs.Close
		Set rs = Nothing
	End Function
	
End Class



Class clsPost

	Private sConnectString
	Private sTableName
	Private arrFieldList
	Private arrDataTypes
	Private arrPrimaryKeys
	Private arrPKDataTypes
	Private sFormatDate
	Private sDateSeparator
	
	Public Property Let ConnectString(ByRef vVal)
		sConnectString = vVal
	End Property
	
	Public Property Let TableName(ByRef vVal)
		sTableName = vVal
	End Property	
	
	Public Property Let FieldList(ByRef vVal)
		arrFieldList = vVal
	End Property	
	
	Public Property Let DataTypes(ByRef vVal)
		arrDataTypes = vVal
	End Property
	
	Public Property Let PrimaryKeys(ByRef vVal)
		arrPrimaryKeys = vVal
	End Property	
	
	Public Property Let PKDataTypes(ByRef vVal)
		arrPKDataTypes = vVal
	End Property
	
	Public Property Let FormatDate(ByRef vVal)
		sFormatDate = vVal
	End Property	
	
	Public Property Let DateSeparator(ByRef vVal)
		sDateSeparator = vVal
	End Property					
	
	Public Function Post()
		'*****************************************************************************
		'	Count Number Of Fields Array & Number Of Primary Keys Array
		'*****************************************************************************

		Dim Item
		NumOfArrFields = 0
		For Each Item In arrFieldList
			NumOfArrFields = NumOfArrFields + 1
		Next
		NumOfArrKeys = 0
		For Each Item In arrPrimaryKeys
			NumOfArrKeys = NumOfArrKeys + 1
		Next

		'*****************************************************************************
		'	GET SUBMITTED DATA
		'*****************************************************************************

		set cn = server.CreateObject("ADODB.Connection")
		cn.Open sConnectString

		Dim oDoc
		set oDoc = Server.CreateObject("MSXML.DOMDocument")
		oDoc.async = false
		oDoc.load(Request)

		set oNodeOriginal = oDoc.documentElement.selectSingleNode("YASP_Original")
		set oNodeModified = oDoc.documentElement.selectSingleNode("YASP_Modified")
		set oNodeDeleted = oDoc.documentElement.selectSingleNode("YASP_Deleted")
		set oNodeNew = oDoc.documentElement.selectSingleNode("YASP_New")

		'*****************************************************************************
		'	Prepare for error report
		'*****************************************************************************

		Dim domErr
		set domErr = Server.CreateObject("MSXML.DOMDocument")	
		set domErr.documentElement = domErr.createElement("ErrorReport")

		Dim domErrRoot
		set domErrRoot = domErr.documentElement	

		'*****************************************************************************
		'	UPDATE RECORDS
		'*****************************************************************************

		If oNodeModified.childNodes.length > 0 Then
			For i=0 to oNodeModified.childNodes.length-1 'FOR EACH RECORDS

				'UPDATE - STEP 1 : Construct field & value pairs
				sFieldValues = ""
				For j = 0 to CInt(NumOfArrFields)-1
					sField = arrFieldList(j)
					sType = arrDataTypes(j)
				
					Select case sType
						case "TEXT" :
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then
								if GetFieldValue(oNodeModified.childNodes(i),sField) = "" then 
									sFieldValues = sFieldValues & ", " & sField & " = null"
								else
									sFieldValues = sFieldValues & ", " & sField & " = '" & GetFieldValue(oNodeModified.childNodes(i),sField) & "'"
								end if
							end if	
						case "NUMBER" :
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then
								if GetFieldValue(oNodeModified.childNodes(i),sField) = "" then
									sFieldValues = sFieldValues & ", " & sField & " = null"
								else
									sFieldValues = sFieldValues & ", " & sField & " = " & GetFieldValue(oNodeModified.childNodes(i),sField)
								end if
							end if						
						case "DATE" :
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then

								if GetFieldValue(oNodeModified.childNodes(i),sField) = "" then
										sFieldValues = sFieldValues & ", " & sField & " = null" 'un
								else
										sDate = GetFieldValue(oNodeModified.childNodes(i),sField)
								
										sDatePart = split(sDate," ")(0)
										sTimePart = mid(sDate,len(sDatePart)+1) 'or 2
	
										d0 = split(sDatePart,sDateSeparator)(0)
										d1 = split(sDatePart,sDateSeparator)(1)
										d2 = split(sDatePart,sDateSeparator)(2)
										Select case sFormatDate
											case "ddMMyyyy","dMyyyy" :
												sDatePart = d1 & "/" & d0 & "/" & d2
											case "MMddyyyy","Mdyyyy" :
												sDatePart = d0 & "/" & d1 & "/" & d2
											case "yyyyMMdd","yyyyMd" :
												sDatePart = d1 & "/" & d2 & "/" & d0
										End Select
										if sTimePart <> "" then
											sFieldValues = sFieldValues & ", " & sField & " = #" & sDatePart & " " & sTimePart & "#"
										else
											sFieldValues = sFieldValues & ", " & sField & " = #" & sDatePart & "#"
										end if
								end if
								
							end if					
						case "BOOLEAN" : '(value must be -1/0 or true/false)
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then
								sFieldValues = sFieldValues & ", " & sField & " = " & GetFieldValue(oNodeModified.childNodes(i),sField)
							end if	
					End select
				Next
				sFieldValues = mid(sFieldValues,2)'Remove the first comma ","

				'UPDATE - STEP 2 : Construct primary key conditions
				sKeyFields = ""
				For j = 0 to CInt(NumOfArrKeys)-1
					sKey = arrPrimaryKeys(j)
					sType = arrPKDataTypes(j)

					Select case sType 'Type for Primary Key : TEXT, NUMBER
						case "TEXT" :
							if Not IsNull(GetKeyFieldValue(oNodeModified.childNodes(i),sKey)) then
								sKeyFields = sKeyFields & " AND " & sKey & " = '" & GetKeyFieldValue(oNodeModified.childNodes(i),sKey) & "'"
							end if	
						case "NUMBER" :
							if Not IsNull(GetKeyFieldValue(oNodeModified.childNodes(i),sKey)) then
								sKeyFields = sKeyFields & " AND " & sKey & " = " & GetKeyFieldValue(oNodeModified.childNodes(i),sKey)
							end if	
							
					End select			
				Next
				sKeyFields = mid(sKeyFields,5) 'Remove the first " AND"
				
				'UPDATE - STEP 3 : Construct SQL Statement
				SQL = "UPDATE " & sTableName & " SET " & sFieldValues & " WHERE " & sKeyFields

				'UPDATE - STEP 4 : Execute SQL Statement
				on error resume next
				cn.Execute SQL
				
				'UPDATE - STEP 5 : Construct Error Report
				if err<>0 then
						set oNode = domErr.createElement("Row")
						set domErrRow = domErrRoot.appendChild(oNode)			

						set oNode = oNodeOriginal.childNodes(i).cloneNode(true)
						set domErrOriginal = domErrRow.appendChild(oNode)	
						
						set oNode = oNodeModified.childNodes(i).cloneNode(true)
						domErrRow.appendChild(oNode)
						
						set oNode = domErr.createElement("SQL")
						set domErrSQL = domErrRow.appendChild(oNode)
						domErrSQL.text = SQL	
						
						set oNode = domErr.createElement("Action")
						set domErrAction = domErrRow.appendChild(oNode)
						domErrAction.text = "UPDATE"
						
						set oNode = domErr.createElement("Source")
						set domErrSource = domErrRow.appendChild(oNode)
						domErrSource.text = err.Source 
						
						set oNode = domErr.createElement("Number")
						set domErrNumber = domErrRow.appendChild(oNode)
						domErrNumber.text = err.number
						
						set oNode = domErr.createElement("Description")
						set domErrDescription = domErrRow.appendChild(oNode)
						domErrDescription.text = err.Description
						
						err.Clear 
				end if	
				
				
			Next
		End If

		'*****************************************************************************
		'	DELETE RECORDS
		'*****************************************************************************
		If oNodeDeleted.childNodes.length > 0 Then

			For i=0 to oNodeDeleted.childNodes.length-1 'FOR EACH RECORDS
			
				'DELETE - STEP 1 : Construct primary key conditions
				sFieldValue = ""
				if Not IsNull(GetFieldValue(oNodeDeleted.childNodes(i),"ID")) then
					sFieldValue = GetFieldValue(oNodeDeleted.childNodes(i),"ID")
				end if	
				
				'DELETE - STEP 1 : Construct primary key conditions
				sFieldValues = ""
				For j = 0 to CInt(NumOfArrKeys)-1
					sField = arrPrimaryKeys(j)
					sType = arrPKDataTypes(j)
					Select case sType 'Type for Primary Key : TEXT, NUMBER
						case "TEXT" :
							if Not IsNull(GetFieldValue(oNodeDeleted.childNodes(i),sField)) then
								sFieldValues = sFieldValues & " AND " & sField & " = '" & GetFieldValue(oNodeDeleted.childNodes(i),sField) & "'"
							end if	
						case "NUMBER" :
							if Not IsNull(GetFieldValue(oNodeDeleted.childNodes(i),sField)) then
								sFieldValues = sFieldValues & " AND " & sField & " = " & GetFieldValue(oNodeDeleted.childNodes(i),sField)
							end if						
					End select
				Next
				sFieldValues = mid(sFieldValues,5) 'Remove the first " AND"

				'DELETE - STEP 2 : Construct SQL Statement
				SQL = "DELETE FROM " & sTableName & " WHERE " & sFieldValues
					
				'DELETE - STEP 3 : Execute SQL Statement
				on error resume next
				cn.Execute SQL
				
				'DELETE - STEP 4 : Construct Error Report	
				if err<>0 then
						set oNode = domErr.createElement("Row")
						set domErrRow = domErrRoot.appendChild(oNode)			

						set oNode = oNodeOriginal.childNodes(i).cloneNode(true)
						set domErrOriginal = domErrRow.appendChild(oNode)	
						
						set oNode = domErr.createElement("Modified")
						domErrRow.appendChild(oNode)
						
						set oNode = domErr.createElement("SQL")
						set domErrSQL = domErrRow.appendChild(oNode)
						domErrSQL.text = SQL	
						
						set oNode = domErr.createElement("Action")
						set domErrAction = domErrRow.appendChild(oNode)
						domErrAction.text = "DELETE"
						
						set oNode = domErr.createElement("Source")
						set domErrSource = domErrRow.appendChild(oNode)
						domErrSource.text = err.Source 
						
						set oNode = domErr.createElement("Number")
						set domErrNumber = domErrRow.appendChild(oNode)
						domErrNumber.text = err.number
						
						set oNode = domErr.createElement("Description")
						set domErrDescription = domErrRow.appendChild(oNode)
						domErrDescription.text = err.Description
						
						err.Clear 
				end if
			Next
		End If

		'*****************************************************************************
		'	INSERT NEW RECORD
		'*****************************************************************************
		If oNodeNew.childNodes.length > 0 Then

			For i=0 to oNodeNew.childNodes.length-1

				'INSERT - STEP 1 : Construct fields & values
				sFields = ""
				sValues = ""
				For j = 0 to CInt(NumOfArrFields)-1
					sField = arrFieldList(j)
					sType = arrDataTypes(j)
					Select case sType
						case "TEXT" :
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								if GetFieldValue(oNodeNew.childNodes(i),sField) = "" then
									sFields = sFields & "," & sField
									sValues = sValues & ",null"
								else
									sFields = sFields & "," & sField
									sValues = sValues & ",'" & GetFieldValue(oNodeNew.childNodes(i),sField) & "'"
								end if
							end if	
						case "NUMBER" :
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								sFields = sFields & "," & sField
								if GetFieldValue(oNodeNew.childNodes(i),sField) = "" then
										sValues = sValues & ", null"
								else
										sValues = sValues & "," & GetFieldValue(oNodeNew.childNodes(i),sField)
								end if						
							end if	
						case "DATE" :
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								sFields = sFields & "," & sField
								if GetFieldValue(oNodeNew.childNodes(i),sField) = "" then
										sValues = sValues & ",null"
								else
							
										sDate = GetFieldValue(oNodeNew.childNodes(i),sField)
										sDatePart = split(sDate," ")(0)
										sTimePart = mid(sDate,len(sDatePart)+1) 'or 2

										d0 = split(sDatePart,sDateSeparator)(0)
										d1 = split(sDatePart,sDateSeparator)(1)
										d2 = split(sDatePart,sDateSeparator)(2)
										Select case sFormatDate
											case "ddMMyyyy","dMyyyy" :
												sDatePart = d1 & "/" & d0 & "/" & d2
											case "MMddyyyy","Mdyyyy" :
												sDatePart = d0 & "/" & d1 & "/" & d2
											case "yyyyMMdd","yyyyMd" :
												sDatePart = d1 & "/" & d2 & "/" & d0
										End Select
										
										if sTimePart <> "" then
											sValues = sValues & ",#" & sDatePart & " " & sTimePart & "#"
										else
											sValues = sValues & ",#" & sDatePart & "#"
										end if	
								end if							
							end if	
						case "BOOLEAN" : '(value must be -1/0 or true/false)
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								sFields = sFields & "," & sField
								sValues = sValues & "," & GetFieldValue(oNodeNew.childNodes(i),sField)
							end if					
					End select
				Next
				sFields = mid(sFields,2)'Remove the first comma ","
				sValues = mid(sValues,2)'Remove the first comma ","
				
				'INSERT - STEP 2 : Construct SQL Statement
				SQL = "Insert Into " & sTableName & " (" & sFields & ") VALUES (" & sValues & ")"

				'INSERT - STEP 3 : Execute SQL Statement
				on error resume next
				cn.Execute SQL
				
				'INSERT - STEP 4 : Construct Error Report	
				if err<>0 then
						set oNode = domErr.createElement("Row")
						set domErrRow = domErrRoot.appendChild(oNode)			

						set oNode = domErr.createElement("Original")
						domErrRow.appendChild(oNode)
						
						'set oNode = domErr.createElement("Modified")
						'domErrRow.appendChild(oNode)
						set oNode = oNodeNew.childNodes(i).cloneNode(true)
						domErrRow.appendChild(oNode)'Utk Insert error, apa yg di-insert dimasukkan ke  node "Modified"	
						
						set oNode = domErr.createElement("SQL")
						set domErrSQL = domErrRow.appendChild(oNode)
						domErrSQL.text = SQL	
						
						set oNode = domErr.createElement("Action")
						set domErrAction = domErrRow.appendChild(oNode)
						domErrAction.text = "INSERT"
						
						set oNode = domErr.createElement("Source")
						set domErrSource = domErrRow.appendChild(oNode)
						domErrSource.text = err.Source 
						
						set oNode = domErr.createElement("Number")
						set domErrNumber = domErrRow.appendChild(oNode)
						domErrNumber.text = err.number
						
						set oNode = domErr.createElement("Description")
						set domErrDescription = domErrRow.appendChild(oNode)
						domErrDescription.text = err.Description
						
						err.Clear 
				end if
			Next

		End If

		cn.Close 
		set cn = nothing
		
		set Post = domErr
		
	End Function


	'*****************************************************************************
	'	Generic Functions
	'*****************************************************************************
	Private Function GetFieldValue(oNode,FieldName)
		if oNode.getElementsByTagName(FieldName).length = 1 then
			if oNode.getElementsByTagName(FieldName)(0).attributes.length = 0 then 'get yg bukan identity (identity berarti ada attribute IsIdentity=true)
				GetFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(0).text)
			else
				GetFieldValue = null
			end if
		elseif oNode.getElementsByTagName(FieldName).length = 2 then '=2 berarti yg diedit adl identity
			GetFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(0).text)'yg pertama(0) = updated, yg kedua(1) = identity
		else
			GetFieldValue = null
		end if
	End Function
	
	Private Function GetKeyFieldValue(oNode,FieldName)
		if oNode.getElementsByTagName(FieldName).length = 1 then
			GetKeyFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(0).text)
		elseif oNode.getElementsByTagName(FieldName).length = 2 then '=2 berarti yg diedit adl identity
			GetKeyFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(1).text)'yg pertama(0) = updated, yg kedua(1) = identity
		else
			GetKeyFieldValue = null
		end if
	End Function	

	Private Function FixSQL(str)
		FixSQL =  Replace(str,"'","''")
	End Function

End Class
%> 
<%
Dim oQuery
Set oQuery = New clsQuery
oQuery.ConnectString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & Server.MapPath("\database/grid.mdb")
oQuery.SQL = "SELECT Test.TestID,Test.CaseDesc,Test.TestResult,Test.Comment,Test.NeedToFix,Test.AssignedTo, Users.FullName " & _
	"FROM Users INNER JOIN Test ON Users.UserID = Test.AssignedTo"
oQuery.PageSize	= Request.QueryString("PageSize")
oQuery.ShowPage	= Request.QueryString("ShowPage")
oQuery.OrderBy	= Request.QueryString("OrderBy")
oQuery.OrderType = Request.QueryString("OrderType")

Response.ContentType = "text/xml"
Response.Write "<?xml version='1.0' encoding='ISO-8859-1'?>" & vbCRLF 
Dim oDoc
set oDoc = oQuery.GetPage()
Response.Write oDoc.xml
%>

The returned XML data would be :

To implement the grid, we create an HTML page and attach the grid on it. In this case, we need to set the COLUMNS property :

obj1.COLUMNS  = ["TestID",
	"CaseDesc",
	"TestResult",
	"Comment",
	"NeedToFix",
	"AssignedTo",
	"FullName"]				
Then we can set the INPUTTYPES property :
obj1.INPUTTYPES =	[Array("Text",255,false,false),
	Array("Text",255,true,true),
	Array("Text",255,true,true),
	Array("Text",255,true,true),
	Array("Boolean",true),
	Array("LookupSmall",6,"dsoUsers",true),
	Array("")] 
As seen, we set the "AssignedTo" to use "LookupSmall" input type :
Array("LookupSmall",6,"dsoUsers",true)
As you can see, the "Index Of Display Value" is set to 6. This is due to the position of "FullName" (as a display value) in the returned XML from the server. The field "FullName" is just a display value, therefore, we just set the input type to :
Array("")
We also put the name "dsoUsers" for our lookup name. By defining this Lookup Name, we also need to specify the lookup source (URL) for this lookup name using the following line :
obj1.setLookupData("dsoUsers","dataGET/sampleGet_Users.asp?PageSize=100");	
Note that we specify PageSize=100, just to display all records on the lookup page (since the table Users only contains few records). The lookup source, which is sampleGet_Users.asp is used to get the data from database and returns XML data for the grid. Here is the complete code for sampleGet_Users.asp :

<%
Response.Buffer = True
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"

Class clsQuery
	
	Private sSQL
	Private sConnectString
	Private sPageSize
	Private sShowPage
	Private sOrderBy
	Private sOrderType
	Private arrExpression

	
	Public Property Let Expression(ByRef vVal)
		arrExpression = vVal
	End Property	

	Public Property Let SQL(ByRef vVal)
		sSQL = vVal
	End Property
	
	Public Property Let OrderBy(ByRef vVal)
		sOrderBy = vVal
	End Property	
	
	Public Property Let OrderType(ByRef vVal)
		if vVal = "" then 
			sOrderType = "ASC" 'default value
		else
			sOrderType = vVal
		end if		
	End Property
	
	Public Property Let ShowPage(ByRef vVal)
		if vVal = "" then 
			sShowPage = 1 'default value
		else
			sShowPage = CInt(vVal)
		end if
	End Property
	
	Public Property Let PageSize(ByRef vVal)
		if vVal = "" then 
			sPageSize = 10 'default value
		else
			sPageSize = CInt(vVal)
		end if
	End Property
	
	Public Property Let ConnectString(ByRef vVal)
		sConnectString = vVal
	End Property

	Public Function GetPage()
		
		sNewOrderBy = ""
		
		If sOrderBy <> "" Then
		
			Dim Item
			NumOfExps = 0
			if not IsEmpty(arrExpression) then
				For Each Item In arrExpression
					NumOfExps = NumOfExps + 1
				Next
			end if

			if NumOfExps>0 then
				For i = 0 to CInt(NumOfExps)-1
						sAlias = arrExpression(i)(0)
						sExp = arrExpression(i)(1)
						sNewOrderBy = replace(sOrderBy,sAlias,sExp)
				Next
				sSQL = sSQL & " Order By " & sNewOrderBy & " " & sOrderType
			else
				sSQL = sSQL & " Order By " & sOrderBy & " " & sOrderType
			end if

		End If	

		Dim rs
		Set rs = server.CreateObject("ADODB.Recordset") 
		rs.CursorLocation = 3
		rs.Open sSQL, sConnectString, 3, 1, &H0001

		Dim oXMLDOM
		set oXMLDOM = Server.CreateObject("MSXML.DOMDocument")	
		set oXMLDOM.documentElement = oXMLDOM.createElement("result")
		
		Dim root
		set root = oXMLDOM.documentElement		
		
		set oNode = oXMLDOM.createElement("Original")
		set oOriginal = root.appendChild(oNode)
		
		set oNode = oXMLDOM.createElement("PageProperty")'
		set oPageProperty = root.appendChild(oNode)
		
		If rs.RecordCount = 0 Then
			
			set oNode = oXMLDOM.createElement("ShowPage")'
			oNode.text = sShowPage
			oPageProperty.appendChild oNode  
				
			set oNode = oXMLDOM.createElement("PageSize")'
			oNode.text = sPageSize
			oPageProperty.appendChild oNode  		
				
			set oNode = oXMLDOM.createElement("NumOfPages")'
			oNode.text = 0
			oPageProperty.appendChild oNode  
				
			set oNode = oXMLDOM.createElement("OrderBy")'
			oNode.text = sOrderBy
			oPageProperty.appendChild oNode  	
				
			set oNode = oXMLDOM.createElement("OrderType")'
			oNode.text = sOrderType
			oPageProperty.appendChild oNode  			

			'GetPage = oXMLDOM.xml 
			set GetPage = oXMLDOM
				
			rs.Close
			Set rs = Nothing		
			Exit Function
		End If

		rs.PageSize = sPageSize
	    
		Dim NumOfPages
		NumOfPages = rs.PageCount
		If sShowPage < 1 then
			sShowPage = 1
		ElseIf sShowPage > NumOfPages Then
			sShowPage = NumOfPages
		End If
		rs.AbsolutePage = sShowPage

		Dim i
		i = 0
		Dim Field
		Dim oNode

							
		Do Until rs.EOF Or i = sPageSize

			set oNode = oXMLDOM.createElement("Row")
			oOriginal.appendChild oNode
					
			For each Field in rs.Fields 

				

				set oNode = oXMLDOM.createElement(Field.Name)
				if Not LenB(rs(Field.Name).Value)=0  Then
					if Field.type = 7 then 'date
						oNode.text = FormatDateTime(rs(Field.Name).Value,0)'kalau tdk pakai Cstr,format date bisa berubah
					else
						oNode.text = Cstr(rs(Field.Name).Value)'kalau tdk pakai Cstr,format date bisa berubah, toString
					end if					
					
				end if
				oOriginal.lastChild.appendChild oNode 
			Next
	        
			rs.MoveNext
			i = i + 1
		Loop
			
		set oNode = oXMLDOM.createElement("ShowPage")'
		oNode.text = sShowPage
		oPageProperty.appendChild oNode  
			
		set oNode = oXMLDOM.createElement("PageSize")'
		oNode.text = sPageSize
		oPageProperty.appendChild oNode  		
			
		set oNode = oXMLDOM.createElement("NumOfPages")'
		oNode.text = NumOfPages
		oPageProperty.appendChild oNode  
			
		set oNode = oXMLDOM.createElement("OrderBy")'
		oNode.text = sOrderBy
		oPageProperty.appendChild oNode  	
			
		set oNode = oXMLDOM.createElement("OrderType")'
		oNode.text = sOrderType
		oPageProperty.appendChild oNode  			

		'GetPage = oXMLDOM.xml 
		set GetPage = oXMLDOM

		rs.Close
		Set rs = Nothing
	End Function
	
End Class



Class clsPost

	Private sConnectString
	Private sTableName
	Private arrFieldList
	Private arrDataTypes
	Private arrPrimaryKeys
	Private arrPKDataTypes
	Private sFormatDate
	Private sDateSeparator
	
	Public Property Let ConnectString(ByRef vVal)
		sConnectString = vVal
	End Property
	
	Public Property Let TableName(ByRef vVal)
		sTableName = vVal
	End Property	
	
	Public Property Let FieldList(ByRef vVal)
		arrFieldList = vVal
	End Property	
	
	Public Property Let DataTypes(ByRef vVal)
		arrDataTypes = vVal
	End Property
	
	Public Property Let PrimaryKeys(ByRef vVal)
		arrPrimaryKeys = vVal
	End Property	
	
	Public Property Let PKDataTypes(ByRef vVal)
		arrPKDataTypes = vVal
	End Property
	
	Public Property Let FormatDate(ByRef vVal)
		sFormatDate = vVal
	End Property	
	
	Public Property Let DateSeparator(ByRef vVal)
		sDateSeparator = vVal
	End Property					
	
	Public Function Post()
		'*****************************************************************************
		'	Count Number Of Fields Array & Number Of Primary Keys Array
		'*****************************************************************************

		Dim Item
		NumOfArrFields = 0
		For Each Item In arrFieldList
			NumOfArrFields = NumOfArrFields + 1
		Next
		NumOfArrKeys = 0
		For Each Item In arrPrimaryKeys
			NumOfArrKeys = NumOfArrKeys + 1
		Next

		'*****************************************************************************
		'	GET SUBMITTED DATA
		'*****************************************************************************

		set cn = server.CreateObject("ADODB.Connection")
		cn.Open sConnectString

		Dim oDoc
		set oDoc = Server.CreateObject("MSXML.DOMDocument")
		oDoc.async = false
		oDoc.load(Request)

		set oNodeOriginal = oDoc.documentElement.selectSingleNode("YASP_Original")
		set oNodeModified = oDoc.documentElement.selectSingleNode("YASP_Modified")
		set oNodeDeleted = oDoc.documentElement.selectSingleNode("YASP_Deleted")
		set oNodeNew = oDoc.documentElement.selectSingleNode("YASP_New")

		'*****************************************************************************
		'	Prepare for error report
		'*****************************************************************************

		Dim domErr
		set domErr = Server.CreateObject("MSXML.DOMDocument")	
		set domErr.documentElement = domErr.createElement("ErrorReport")

		Dim domErrRoot
		set domErrRoot = domErr.documentElement	

		'*****************************************************************************
		'	UPDATE RECORDS
		'*****************************************************************************

		If oNodeModified.childNodes.length > 0 Then
			For i=0 to oNodeModified.childNodes.length-1 'FOR EACH RECORDS

				'UPDATE - STEP 1 : Construct field & value pairs
				sFieldValues = ""
				For j = 0 to CInt(NumOfArrFields)-1
					sField = arrFieldList(j)
					sType = arrDataTypes(j)
				
					Select case sType
						case "TEXT" :
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then
								if GetFieldValue(oNodeModified.childNodes(i),sField) = "" then 
									sFieldValues = sFieldValues & ", " & sField & " = null"
								else
									sFieldValues = sFieldValues & ", " & sField & " = '" & GetFieldValue(oNodeModified.childNodes(i),sField) & "'"
								end if
							end if	
						case "NUMBER" :
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then
								if GetFieldValue(oNodeModified.childNodes(i),sField) = "" then
									sFieldValues = sFieldValues & ", " & sField & " = null"
								else
									sFieldValues = sFieldValues & ", " & sField & " = " & GetFieldValue(oNodeModified.childNodes(i),sField)
								end if
							end if						
						case "DATE" :
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then

								if GetFieldValue(oNodeModified.childNodes(i),sField) = "" then
										sFieldValues = sFieldValues & ", " & sField & " = null" 'un
								else
										sDate = GetFieldValue(oNodeModified.childNodes(i),sField)
								
										sDatePart = split(sDate," ")(0)
										sTimePart = mid(sDate,len(sDatePart)+1) 'or 2
	
										d0 = split(sDatePart,sDateSeparator)(0)
										d1 = split(sDatePart,sDateSeparator)(1)
										d2 = split(sDatePart,sDateSeparator)(2)
										Select case sFormatDate
											case "ddMMyyyy","dMyyyy" :
												sDatePart = d1 & "/" & d0 & "/" & d2
											case "MMddyyyy","Mdyyyy" :
												sDatePart = d0 & "/" & d1 & "/" & d2
											case "yyyyMMdd","yyyyMd" :
												sDatePart = d1 & "/" & d2 & "/" & d0
										End Select
										if sTimePart <> "" then
											sFieldValues = sFieldValues & ", " & sField & " = #" & sDatePart & " " & sTimePart & "#"
										else
											sFieldValues = sFieldValues & ", " & sField & " = #" & sDatePart & "#"
										end if
								end if
								
							end if					
						case "BOOLEAN" : '(value must be -1/0 or true/false)
							if Not IsNull(GetFieldValue(oNodeModified.childNodes(i),sField)) then
								sFieldValues = sFieldValues & ", " & sField & " = " & GetFieldValue(oNodeModified.childNodes(i),sField)
							end if	
					End select
				Next
				sFieldValues = mid(sFieldValues,2)'Remove the first comma ","

				'UPDATE - STEP 2 : Construct primary key conditions
				sKeyFields = ""
				For j = 0 to CInt(NumOfArrKeys)-1
					sKey = arrPrimaryKeys(j)
					sType = arrPKDataTypes(j)

					Select case sType 'Type for Primary Key : TEXT, NUMBER
						case "TEXT" :
							if Not IsNull(GetKeyFieldValue(oNodeModified.childNodes(i),sKey)) then
								sKeyFields = sKeyFields & " AND " & sKey & " = '" & GetKeyFieldValue(oNodeModified.childNodes(i),sKey) & "'"
							end if	
						case "NUMBER" :
							if Not IsNull(GetKeyFieldValue(oNodeModified.childNodes(i),sKey)) then
								sKeyFields = sKeyFields & " AND " & sKey & " = " & GetKeyFieldValue(oNodeModified.childNodes(i),sKey)
							end if	
							
					End select			
				Next
				sKeyFields = mid(sKeyFields,5) 'Remove the first " AND"
				
				'UPDATE - STEP 3 : Construct SQL Statement
				SQL = "UPDATE " & sTableName & " SET " & sFieldValues & " WHERE " & sKeyFields

				'UPDATE - STEP 4 : Execute SQL Statement
				on error resume next
				cn.Execute SQL
				
				'UPDATE - STEP 5 : Construct Error Report
				if err<>0 then
						set oNode = domErr.createElement("Row")
						set domErrRow = domErrRoot.appendChild(oNode)			

						set oNode = oNodeOriginal.childNodes(i).cloneNode(true)
						set domErrOriginal = domErrRow.appendChild(oNode)	
						
						set oNode = oNodeModified.childNodes(i).cloneNode(true)
						domErrRow.appendChild(oNode)
						
						set oNode = domErr.createElement("SQL")
						set domErrSQL = domErrRow.appendChild(oNode)
						domErrSQL.text = SQL	
						
						set oNode = domErr.createElement("Action")
						set domErrAction = domErrRow.appendChild(oNode)
						domErrAction.text = "UPDATE"
						
						set oNode = domErr.createElement("Source")
						set domErrSource = domErrRow.appendChild(oNode)
						domErrSource.text = err.Source 
						
						set oNode = domErr.createElement("Number")
						set domErrNumber = domErrRow.appendChild(oNode)
						domErrNumber.text = err.number
						
						set oNode = domErr.createElement("Description")
						set domErrDescription = domErrRow.appendChild(oNode)
						domErrDescription.text = err.Description
						
						err.Clear 
				end if	
				
				
			Next
		End If

		'*****************************************************************************
		'	DELETE RECORDS
		'*****************************************************************************
		If oNodeDeleted.childNodes.length > 0 Then

			For i=0 to oNodeDeleted.childNodes.length-1 'FOR EACH RECORDS
			
				'DELETE - STEP 1 : Construct primary key conditions
				sFieldValue = ""
				if Not IsNull(GetFieldValue(oNodeDeleted.childNodes(i),"ID")) then
					sFieldValue = GetFieldValue(oNodeDeleted.childNodes(i),"ID")
				end if	
				
				'DELETE - STEP 1 : Construct primary key conditions
				sFieldValues = ""
				For j = 0 to CInt(NumOfArrKeys)-1
					sField = arrPrimaryKeys(j)
					sType = arrPKDataTypes(j)
					Select case sType 'Type for Primary Key : TEXT, NUMBER
						case "TEXT" :
							if Not IsNull(GetFieldValue(oNodeDeleted.childNodes(i),sField)) then
								sFieldValues = sFieldValues & " AND " & sField & " = '" & GetFieldValue(oNodeDeleted.childNodes(i),sField) & "'"
							end if	
						case "NUMBER" :
							if Not IsNull(GetFieldValue(oNodeDeleted.childNodes(i),sField)) then
								sFieldValues = sFieldValues & " AND " & sField & " = " & GetFieldValue(oNodeDeleted.childNodes(i),sField)
							end if						
					End select
				Next
				sFieldValues = mid(sFieldValues,5) 'Remove the first " AND"

				'DELETE - STEP 2 : Construct SQL Statement
				SQL = "DELETE FROM " & sTableName & " WHERE " & sFieldValues
					
				'DELETE - STEP 3 : Execute SQL Statement
				on error resume next
				cn.Execute SQL
				
				'DELETE - STEP 4 : Construct Error Report	
				if err<>0 then
						set oNode = domErr.createElement("Row")
						set domErrRow = domErrRoot.appendChild(oNode)			

						set oNode = oNodeOriginal.childNodes(i).cloneNode(true)
						set domErrOriginal = domErrRow.appendChild(oNode)	
						
						set oNode = domErr.createElement("Modified")
						domErrRow.appendChild(oNode)
						
						set oNode = domErr.createElement("SQL")
						set domErrSQL = domErrRow.appendChild(oNode)
						domErrSQL.text = SQL	
						
						set oNode = domErr.createElement("Action")
						set domErrAction = domErrRow.appendChild(oNode)
						domErrAction.text = "DELETE"
						
						set oNode = domErr.createElement("Source")
						set domErrSource = domErrRow.appendChild(oNode)
						domErrSource.text = err.Source 
						
						set oNode = domErr.createElement("Number")
						set domErrNumber = domErrRow.appendChild(oNode)
						domErrNumber.text = err.number
						
						set oNode = domErr.createElement("Description")
						set domErrDescription = domErrRow.appendChild(oNode)
						domErrDescription.text = err.Description
						
						err.Clear 
				end if
			Next
		End If

		'*****************************************************************************
		'	INSERT NEW RECORD
		'*****************************************************************************
		If oNodeNew.childNodes.length > 0 Then

			For i=0 to oNodeNew.childNodes.length-1

				'INSERT - STEP 1 : Construct fields & values
				sFields = ""
				sValues = ""
				For j = 0 to CInt(NumOfArrFields)-1
					sField = arrFieldList(j)
					sType = arrDataTypes(j)
					Select case sType
						case "TEXT" :
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								if GetFieldValue(oNodeNew.childNodes(i),sField) = "" then
									sFields = sFields & "," & sField
									sValues = sValues & ",null"
								else
									sFields = sFields & "," & sField
									sValues = sValues & ",'" & GetFieldValue(oNodeNew.childNodes(i),sField) & "'"
								end if
							end if	
						case "NUMBER" :
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								sFields = sFields & "," & sField
								if GetFieldValue(oNodeNew.childNodes(i),sField) = "" then
										sValues = sValues & ", null"
								else
										sValues = sValues & "," & GetFieldValue(oNodeNew.childNodes(i),sField)
								end if						
							end if	
						case "DATE" :
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								sFields = sFields & "," & sField
								if GetFieldValue(oNodeNew.childNodes(i),sField) = "" then
										sValues = sValues & ",null"
								else
							
										sDate = GetFieldValue(oNodeNew.childNodes(i),sField)
										sDatePart = split(sDate," ")(0)
										sTimePart = mid(sDate,len(sDatePart)+1) 'or 2

										d0 = split(sDatePart,sDateSeparator)(0)
										d1 = split(sDatePart,sDateSeparator)(1)
										d2 = split(sDatePart,sDateSeparator)(2)
										Select case sFormatDate
											case "ddMMyyyy","dMyyyy" :
												sDatePart = d1 & "/" & d0 & "/" & d2
											case "MMddyyyy","Mdyyyy" :
												sDatePart = d0 & "/" & d1 & "/" & d2
											case "yyyyMMdd","yyyyMd" :
												sDatePart = d1 & "/" & d2 & "/" & d0
										End Select
										
										if sTimePart <> "" then
											sValues = sValues & ",#" & sDatePart & " " & sTimePart & "#"
										else
											sValues = sValues & ",#" & sDatePart & "#"
										end if	
								end if							
							end if	
						case "BOOLEAN" : '(value must be -1/0 or true/false)
							if Not IsNull(GetFieldValue(oNodeNew.childNodes(i),sField)) then
								sFields = sFields & "," & sField
								sValues = sValues & "," & GetFieldValue(oNodeNew.childNodes(i),sField)
							end if					
					End select
				Next
				sFields = mid(sFields,2)'Remove the first comma ","
				sValues = mid(sValues,2)'Remove the first comma ","
				
				'INSERT - STEP 2 : Construct SQL Statement
				SQL = "Insert Into " & sTableName & " (" & sFields & ") VALUES (" & sValues & ")"

				'INSERT - STEP 3 : Execute SQL Statement
				on error resume next
				cn.Execute SQL
				
				'INSERT - STEP 4 : Construct Error Report	
				if err<>0 then
						set oNode = domErr.createElement("Row")
						set domErrRow = domErrRoot.appendChild(oNode)			

						set oNode = domErr.createElement("Original")
						domErrRow.appendChild(oNode)
						
						'set oNode = domErr.createElement("Modified")
						'domErrRow.appendChild(oNode)
						set oNode = oNodeNew.childNodes(i).cloneNode(true)
						domErrRow.appendChild(oNode)'Utk Insert error, apa yg di-insert dimasukkan ke  node "Modified"	
						
						set oNode = domErr.createElement("SQL")
						set domErrSQL = domErrRow.appendChild(oNode)
						domErrSQL.text = SQL	
						
						set oNode = domErr.createElement("Action")
						set domErrAction = domErrRow.appendChild(oNode)
						domErrAction.text = "INSERT"
						
						set oNode = domErr.createElement("Source")
						set domErrSource = domErrRow.appendChild(oNode)
						domErrSource.text = err.Source 
						
						set oNode = domErr.createElement("Number")
						set domErrNumber = domErrRow.appendChild(oNode)
						domErrNumber.text = err.number
						
						set oNode = domErr.createElement("Description")
						set domErrDescription = domErrRow.appendChild(oNode)
						domErrDescription.text = err.Description
						
						err.Clear 
				end if
			Next

		End If

		cn.Close 
		set cn = nothing
		
		set Post = domErr
		
	End Function


	'*****************************************************************************
	'	Generic Functions
	'*****************************************************************************
	Private Function GetFieldValue(oNode,FieldName)
		if oNode.getElementsByTagName(FieldName).length = 1 then
			if oNode.getElementsByTagName(FieldName)(0).attributes.length = 0 then 'get yg bukan identity (identity berarti ada attribute IsIdentity=true)
				GetFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(0).text)
			else
				GetFieldValue = null
			end if
		elseif oNode.getElementsByTagName(FieldName).length = 2 then '=2 berarti yg diedit adl identity
			GetFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(0).text)'yg pertama(0) = updated, yg kedua(1) = identity
		else
			GetFieldValue = null
		end if
	End Function
	
	Private Function GetKeyFieldValue(oNode,FieldName)
		if oNode.getElementsByTagName(FieldName).length = 1 then
			GetKeyFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(0).text)
		elseif oNode.getElementsByTagName(FieldName).length = 2 then '=2 berarti yg diedit adl identity
			GetKeyFieldValue = FixSQL(oNode.getElementsByTagName(FieldName)(1).text)'yg pertama(0) = updated, yg kedua(1) = identity
		else
			GetKeyFieldValue = null
		end if
	End Function	

	Private Function FixSQL(str)
		FixSQL =  Replace(str,"'","''")
	End Function

End Class
%> 
<%
Dim oQuery
Set oQuery = New clsQuery
oQuery.ConnectString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & Server.MapPath("\database/grid.mdb")
oQuery.SQL = "SELECT * FROM Users"
oQuery.PageSize	= Request.QueryString("PageSize")
oQuery.ShowPage	= Request.QueryString("ShowPage")
oQuery.OrderBy	= Request.QueryString("OrderBy")
oQuery.OrderType = Request.QueryString("OrderType")

Response.ContentType = "text/xml"
Response.Write "<?xml version='1.0' encoding='ISO-8859-1'?>" & vbCRLF 
Dim oDoc
set oDoc = oQuery.GetPage()
Response.Write oDoc.xml
%>

And here is the complete code for the grid page (You can see this code on file : sample4.htm)

<html>
<head>
	<link rel="stylesheet" type="text/css" href="include/WebGridEXP.css">
	<script language="JavaScript" src="include/WebGridEXP.js"></script>
	<script language="JavaScript">
	function Init()
		{
		obj1.COLUMNS    =	["TestID",
				"CaseDesc",
				"TestResult",
				"Comment",
				"NeedToFix",
				"AssignedTo",
				"FullName"]

		obj1.IDENTITY   =	["TestID"]
							
		obj1.INPUTTYPES =	[Array("Text",255,false,false),
				Array("Text",255,true,true),
				Array("Text",255,true,true),
				Array("Text",255,true,true),
				Array("Boolean",true),
				Array("LookupSmall",6,"dsoUsers",true),
				Array("")] 
								
		obj1.setLookupData("dsoUsers","dataGET/sampleGet_Users.asp?PageSize=100");				
		
		obj1.CAPTIONS   =	["ID",
				"Case Description",
				"Result",
				"Comment",
				"Need To Fix",
				"AssignedTo",
				"Select User"]
							
		obj1.CELLWIDTH  =	[35,190,190,190,95,100,null]
		obj1.CELLHEIGHT =	100
				
		obj1.UrlGET     =	"dataGET/sampleGet4.asp" 
		obj1.UrlPOST    =	"dataPOST/samplePost4.asp" 
		obj1.ImgURL     =	"include"

		obj1.getData();
		}
	</script>	
</head>
<body onload="Init()">

<script>
var obj1 = new WebGridEXP("obj1")
</script>

</body>
</html>

Here is the grid result, displayed on browser.