I am trying to create a link to dynamically open a website that will
bring some of the information from the ultrawebgrid over to
another .aspx page. I am having problems in 1. trying to access the
invidual row in the datagrid as a whole and 2. getting the values in
the cells.
Any suggestions? The code is below.
My javascript:
<script type="text/javascript">
function CUDocList(fndocid)
{
var features = "";
var name = "CUDocList_" + fndocid;
var win = window.open('<%=ResolveUrl("~/ContractUnderwriting/
CUDocList.aspx")%>' + '?a=' + fndocid, name, features);
win.focus();
}
</script>
In the code behind:
Private Sub GetDefaultView(ByRef fromDate As Date, ByRef toDate As
Date)
Dim contractUnderwriting As IContractUnderwriting =
DirectCast(RemotingHelper.GetObject(GetType(IContr actUnderwriting)),
IContractUnderwriting)
Dim gridRows As DataSet =
contractUnderwriting.GetAllStatuses(Profile.OrgId)
Dim expr As String = String.Format("'<a>img src=""{0}""
alt=""Folder"" width=""16"" height=""16"" border=""0""/></a>'",
ResolveUrl("~/images/btn_folder.gif"))
Dim viewColumn As New DataColumn("view", GetType(String),
expr)
If gridRows.Tables(0).Rows().Count = 0 Then
displayGrid.Visible = False
lblErrorMsg.Visible = True
Else
displayGrid.Visible = True
lblErrorMsg.Visible = False
If ((fromDate = Nothing) And (toDate = Nothing)) Then
gridRows.Tables(0).Columns.Add(viewColumn)
displayGrid.DataSource = gridRows
displayGrid.DataBind()
Else
GetFilteredView(gridRows, fromDate, toDate)
End If
End If
End Sub
Protected Sub displayGrid_clickcellevent(ByVal sender As Object, ByVal
e As Infragistics.WebUI.UltraWebGrid.CellEventArgs) Handles
displayGrid.ClickCellButton
Session("docID") = displayGrid.Columns(7).BaseColumnName
Session("certNum") = displayGrid.Columns(8).BaseColumnName
Session("docType") = displayGrid.Columns(9).BaseColumnName (I
do not know how to pull the individual values of the column)
Response.Redirect("'<a href=""javascript:CUDocList(' + fndocid
+ ')""></a>'")
End Sub