S
samir dsf
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.EventArgs) 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.Username & "' and
(CALLSTATUS='OPEN' or CALLSTATUS='PENDING') order by CALLSTATUS desc"
BindData()
End If
End Sub
Sub BindData()
Try
GoToDBOpenConn(strSQL)
Dim dt As New DataTable
myDa.Fill(dt)
Me.dgDisplayModules.DataSource = dt
Me.dgDisplayModules.DataBind()
Catch ex As Exception
Throw ex
Finally
GoToDBCloseConn()
End Try
End Sub
Private Sub dgDisplayModules_ItemDataBound(ByVal sender As
System.Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
Dim itemType As System.Web.UI.WebControls.ListItemType =
e.Item.ItemType
If ((e.Item.ItemType =
System.Web.UI.WebControls.ListItemType.EditItem) Or (e.Item.ItemType =
System.Web.UI.WebControls.ListItemType.Item) Or (e.Item.ItemType =
System.Web.UI.WebControls.ListItemType.SelectedItem) Or (e.Item.ItemType
= System.Web.UI.WebControls.ListItemType.AlternatingItem)) Then
Dim row As DataRowView = CType(e.Item.DataItem,
DataRowView)
Dim urlParams As String = "CallId=" +
row("CALLID").ToString()
Dim tabid As Int32 = 150
Dim tabid2 As Int32 = 172
e.Item.Cells(0).Text = "<A href='" &
DotNetNuke.Common.Globals.NavigateURL(tabid, "", urlParams) & "'
target=""_parent"">" + row("CALLID").ToString() & "</A>"
e.Item.Cells(1).Text = "<A href='" &
DotNetNuke.Common.Globals.NavigateURL(tabid2, "", urlParams) & "'
target=""_parent"">" + ByteArrayToString(row("PROBLEM")) & "...</A>"
End If
End Sub
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.EventArgs) 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.Username & "' and
(CALLSTATUS='OPEN' or CALLSTATUS='PENDING') order by CALLSTATUS desc"
BindData()
End If
End Sub
Sub BindData()
Try
GoToDBOpenConn(strSQL)
Dim dt As New DataTable
myDa.Fill(dt)
Me.dgDisplayModules.DataSource = dt
Me.dgDisplayModules.DataBind()
Catch ex As Exception
Throw ex
Finally
GoToDBCloseConn()
End Try
End Sub
Private Sub dgDisplayModules_ItemDataBound(ByVal sender As
System.Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
Dim itemType As System.Web.UI.WebControls.ListItemType =
e.Item.ItemType
If ((e.Item.ItemType =
System.Web.UI.WebControls.ListItemType.EditItem) Or (e.Item.ItemType =
System.Web.UI.WebControls.ListItemType.Item) Or (e.Item.ItemType =
System.Web.UI.WebControls.ListItemType.SelectedItem) Or (e.Item.ItemType
= System.Web.UI.WebControls.ListItemType.AlternatingItem)) Then
Dim row As DataRowView = CType(e.Item.DataItem,
DataRowView)
Dim urlParams As String = "CallId=" +
row("CALLID").ToString()
Dim tabid As Int32 = 150
Dim tabid2 As Int32 = 172
e.Item.Cells(0).Text = "<A href='" &
DotNetNuke.Common.Globals.NavigateURL(tabid, "", urlParams) & "'
target=""_parent"">" + row("CALLID").ToString() & "</A>"
e.Item.Cells(1).Text = "<A href='" &
DotNetNuke.Common.Globals.NavigateURL(tabid2, "", urlParams) & "'
target=""_parent"">" + ByteArrayToString(row("PROBLEM")) & "...</A>"
End If
End Sub