hi
I had been using this datagrid for long. all well...but suddenly the
itemdatabound event is not at all getting called...i dont see my
links..initally it worked well
here is the page_load and itemdatabound event.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
If Not Me.IsPostBack Then
strSQL = "select CALLID, PROBLEM, REPORTED, CALLSTATUS
from CALLIDS where USERNAME='" & UserInfo.Userna me & "' and
(CALLSTATUS='OP EN' or CALLSTATUS='PEN DING') order by CALLSTATUS desc"
BindData()
End If
End Sub
Sub BindData()
Try
GoToDBOpenConn( strSQL)
Dim dt As New DataTable
myDa.Fill(dt)
Me.dgDisplayMod ules.DataSource = dt
Me.dgDisplayMod ules.DataBind()
Catch ex As Exception
Throw ex
Finally
GoToDBCloseConn ()
End Try
End Sub
Private Sub dgDisplayModule s_ItemDataBound (ByVal sender As
System.Object, ByVal e As
System.Web.UI.W ebControls.Data GridItemEventAr gs)
Dim itemType As System.Web.UI.W ebControls.List ItemType =
e.Item.ItemType
If ((e.Item.ItemTy pe =
System.Web.UI.W ebControls.List ItemType.EditIt em) Or (e.Item.ItemTyp e =
System.Web.UI.W ebControls.List ItemType.Item) Or (e.Item.ItemTyp e =
System.Web.UI.W ebControls.List ItemType.Select edItem) Or (e.Item.ItemTyp e
= System.Web.UI.W ebControls.List ItemType.Altern atingItem)) Then
Dim row As DataRowView = CType(e.Item.Da taItem,
DataRowView)
Dim urlParams As String = "CallId=" +
row("CALLID").T oString()
Dim tabid As Int32 = 150
Dim tabid2 As Int32 = 172
e.Item.Cells(0) .Text = "<A href='" &
DotNetNuke.Comm on.Globals.Navi gateURL(tabid, "", urlParams) & "'
target=""_paren t"">" + row("CALLID").T oString() & "</A>"
e.Item.Cells(1) .Text = "<A href='" &
DotNetNuke.Comm on.Globals.Navi gateURL(tabid2, "", urlParams) & "'
target=""_paren t"">" + ByteArrayToStri ng(row("PROBLEM ")) & "...</A>"
End If
End Sub
*** Sent via Developersdex
http://www.developersdex.com ***